This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _omb_prompt_git { | |
command git "$@" | |
} | |
function _omb_prompt_git_status_enabled { | |
[[ $(_omb_prompt_git config --get-regexp '^(oh-my-zsh|bash-it|oh-my-bash)\.hide-status$' | | |
awk '$2== "1" {hide_status = 1;} END { print hide_status; }') != "1" ]] | |
} | |
# # Note: The same name of a functionis defined in omb-prompt-base. We comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# shell | |
sudo apt -y install libnss3-tools | |
# Adding aliases if they don't already exist | |
grep -q "alias sf=" ~/.bashrc || echo 'alias sf="symfony console"' >> ~/.bashrc | |
grep -q "alias mi=" ~/.bashrc || echo 'alias mi="sf doctrine:migrations:migrate -n"' >> ~/.bashrc | |
grep -q "alias cc=" ~/.bashrc || echo 'alias cc="sf cache:clear"' >> ~/.bashrc | |
grep -q "alias st=" ~/.bashrc || echo 'alias st="git status"' >> ~/.bashrc | |
grep -q "alias t=" ~/.bashrc || echo 'alias t="lazygit"' >> ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for framework | |
sudo apt update && sudo apt upgrade -y && sudo snap refresh && echo "options snd-hda-intel model=dell-headset-multi" | sudo tee -a /etc/modprobe.d/alsa-base.conf && gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']" && sudo sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT.*/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash module_blacklist=hid_sensor_hub nvme.noacpi=1"/g' /etc/default/grub && sudo update-grub && echo "[connection]" | sudo tee /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf && echo "wifi.powersave = 2" | sudo tee -a /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf | |
# start clean | |
sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade | |
# Basics | |
sudo apt -y install \ | |
git zsh automake docker.io ca-certificates curl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import i18n from 'i18next'; | |
import { initReactI18next } from 'react-i18next'; | |
import frYaml from 'js-yaml-loader!../translations/messages.fr.yml'; | |
import enYaml from 'js-yaml-loader!../translations/messages.en.yml'; | |
const splitPlurals = (object) => { | |
const newObject = {}; | |
Object.keys(object).forEach((key) => { | |
let elem = object[key]; | |
if (typeof elem === 'object') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Form; | |
use Symfony\Component\Form\Extension\Core\Type\CollectionType; | |
use Symfony\Component\Form\FormInterface; | |
use Symfony\Component\Form\FormView; | |
use Symfony\Component\OptionsResolver\OptionsResolver; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\Form; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\Extension\Core\Type\PasswordType; | |
use Symfony\Component\Form\Extension\Core\Type\RepeatedType; | |
use Symfony\Component\Form\Extension\Core\Type\SubmitType; | |
use Symfony\Component\Form\FormBuilderInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DATETIME=`date +%y%m%d-%H_%M_%S` | |
DST=$1 | |
DATABASE=$2 | |
days=30 | |
EXPORT_CMD="pg_dump $DATABASE -F p > /backup/$DATABASE-dump.sql" | |
echo "$EXPORT_CMD" | |
showhelp(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo swapon --show | |
free -h | |
sudo fallocate -l 1G /swapfile | |
ls -lh /swapfile | |
sudo chmod 600 /swapfile | |
ls -lh /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo swapon --show | |
free -h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run.config: | |
cache_dirs: | |
- vendor | |
- node_modules | |
engine: php | |
engine.config: | |
runtime: php-7.1 | |
extensions: | |
- pdo_pgsql | |
- bcmath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\GraphQL\Type; | |
use AppBundle\Entity\User; | |
use Misd\PhoneNumberBundle\Templating\Helper\PhoneNumberFormatHelper; | |
use Youshido\GraphQL\Config\Object\ObjectTypeConfig; | |
use Youshido\GraphQL\Execution\ResolveInfo; | |
use Youshido\GraphQL\Field\Field; |
NewerOlder