This file contains hidden or 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
///~/projects/xxx/.git/hooks $ cat pre-commit | |
#!/bin/sh | |
branch="$(git rev-parse --abbrev-ref HEAD)" | |
if [ "$branch" = "master" ]; then | |
echo "You can't commit directly to master branch" | |
exit 1 | |
fi |
This file contains hidden or 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
/* | |
const data = [ | |
{ | |
"EN": "e.g. Art, Coins, Jewellery, Antiques, Cars", | |
"NL": "bijv. kunst, munten, sieraden, antiek, auto's", | |
"DE": "z.B. Kunst, Münzen, Schmuck, Antiquitäten, Autos", | |
"FR": "par exemple art, monnaies, bijoux, antiquités, voitures", | |
"IT": "per es. Arte, Monete, Gioielli, Antiquariato, Auto", | |
"ES": "por ejemplo, arte, monedas, joyería, antigüedades, coches", | |
"PT": "e.g. arte, moedas, jóias, antiguidades, carros", |
This file contains hidden or 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
yarn run test --testPathPattern="screens" --watch |
This file contains hidden or 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
git reset --soft last-commit-before-branch | |
then unstage all files changed and add as you wish create new commits etc. |
This file contains hidden or 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 npm cache clean -f | |
sudo npm install -g n | |
sudo n stable |
This file contains hidden or 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 runuser -l root -c 'pm2 restart myapp' |
This file contains hidden or 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
//https://www.facebook.com/ads/preferences/?entry_product=ad_settings_screen | |
//Put this in console and watch :) | |
clear(); | |
document.querySelector('#u_0_t ._2qo2 ._2qo6').click(); | |
setTimeout(()=>{ | |
var seeMoreInterval = setInterval(()=>{ | |
if(document.querySelector('._45yr')) { | |
document.querySelector('._45yr').click() | |
} else { |
This file contains hidden or 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
service nginx stop;sudo -H /opt/letsencrypt/letsencrypt-auto renew;service nginx start |
This file contains hidden or 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
#I keep forgetting this! | |
zcat myfile.sql.gz | mysql -u root -ppassword mydbname |
This file contains hidden or 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 | |
use Migrations\AbstractMigration; | |
class ArticlesI18n extends AbstractMigration | |
{ | |
/** | |
* Change Method. | |
* | |
* More information on this method is available here: | |
* http://docs.phinx.org/en/latest/migrations.html#the-change-method |
NewerOlder