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
docker rmi $(docker images | grep none | awk '{print $3}') |
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
delimiter $$ | |
CREATE FUNCTION `SPLIT_STR`( | |
x VARCHAR(255), | |
delim VARCHAR(12), | |
pos INT | |
) RETURNS varchar(255) CHARSET utf8 COLLATE utf8_unicode_ci | |
RETURN REPLACE(SUBSTRING(SUBSTRING_INDEX(x, delim, pos), | |
CHAR_LENGTH(SUBSTRING_INDEX(x, delim, pos -1)) + 1), | |
delim, '') |
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 rmmod r8169; sleep 1; sudo modprobe r8169; |
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
zcat my-full-backup.sql.gz | sed -n '/^-- Table structure for table `mytable`/,/^-- Table structure for table /p' > my-table.sql |
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 apt install texlive-extra-utils | |
pdfcrop --margins '5 10 5 20' input.pdf output.pdf |
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 add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update | |
sudo apt-get install -y boot-repair && boot-repair & |
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
var separatePinyinInSyllables = function (pinyin) { | |
var vowels = 'aāáǎàeēéěèiīíǐìoōóǒòuūúǔù'; | |
return pinyin | |
.replace(new RegExp('([' + vowels + '])([^' + vowels + 'nr\w\s])'), '$1 $2') // This line does most of the work | |
.replace(new RegExp('(\w)([csz]h)'), '$1 $2') // double-consonant initials | |
.replace(new RegExp('(n)([^' + vowels + 'vg\w\s])'), '$1 $2') // cleans up most n compounds | |
.replace(new RegExp('([' + vowels + 'v])([^' + vowels + '\w\s])([' + vowels + 'v])'), '$1 $2$3') // assumes correct Pinyin (i.e., no missing apostrophes) | |
.replace(new RegExp('([' + vowels + 'v])(n)(g)([' + vowels + 'v])'), '$1$2 $3$4') // assumes correct Pinyin, i.e. changan = chan + gan |
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
ext install html-snippets | |
ext install html-css-class-completion | |
ext install debugger-for-chrome | |
ext install beautify | |
ext install bower | |
ext install Angular1 | |
ext install JavaScriptSnippets |
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
winpty docker exec -it CONTAINER_NAME bash |
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 swapoff -a | |
sudo swapon -a |