- add
cgroup_enable=memory
to GRUB_CMDLINE_LINUX_DEFAULT var in/etc/default/grub
- update-grub
- restart machine
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 csv | |
import glob | |
import plistlib | |
clientProject = 'My Project' | |
for filename in glob.glob("*.bex"): | |
root = plistlib.readPlist(filename) | |
with open(filename+'.csv', 'wb') as out: | |
out = csv.writer(out, delimiter='|') | |
out.writerow(['Slip', 'Start', 'End', 'Duration (minutes)']) |
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
/** | |
* @author Anatoly Mironov (mirontoli) | |
* http://sharepointkunskap.wordpress.com | |
* http://www.bool.se | |
* | |
* http://stackoverflow.com/questions/3605495/generate-a-list-of-localized-language-names-with-links-to-google-translate/14800384#14800384 | |
* http://stackoverflow.com/questions/10997128/language-name-from-iso-639-1-code-in-javascript/14800499#14800499 | |
* | |
* using Phil Teare's answer on stackoverflow | |
* http://stackoverflow.com/questions/3217492/list-of-language-codes-in-yaml-or-json/4900304#4900304 |
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
/** | |
* Created at 03/17/2017 | |
* Developed by Jorge Cuesta <[email protected]> | |
* Developed by Jeffrey Soriano <[email protected]> | |
*/ | |
// ### Use cases | |
/* | |
keys & data -> result |
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 keys = []; | |
var results = []; | |
var keyCount = 100; | |
var iterations = 10000; | |
//generate keys 0 to <keycount> | |
for (var i=0; i < keyCount; i++) { | |
keys.push(i); | |
results.push({ id: i }) | |
} |
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 keys = []; | |
var results = []; | |
var keyCount = 100; | |
var iterations = 10000; | |
//generate keys 0 to <keycount> | |
for (var i=0; i < keyCount; i++) { | |
keys.push(i); | |
results.push({ id: i }) | |
} |
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
# clear old credentials | |
git credential-osxkeychain erase | |
host=github.com | |
protocol=https | |
<enter> | |
# view existing credentials | |
git credential-osxkeychain get | |
host=github.com | |
<enter> |
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 | |
# install doctl and hostess before use: | |
# https://github.com/digitalocean/doctl | |
# https://github.com/cbednarski/hostess | |
# | |
# brew install doctl | |
# brew install hostess | |
PREFIX=yourdomain |
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
# delete alias: | |
# git config --global --unset alias.aliasName | |
git alias lol 'log --oneline --graph --decorate' | |
git alias pullbase '!f() { branchName=${1-master}; git checkout $branchName && git pull && git checkout - && git rebase $branchName; }; f' | |
git alias basepush '!f() { branchName=$(git name-rev --name-only HEAD); echo Merge "$branchName" and push origin; read && git checkout - && read && git merge $branchName && read && git push origin && read && git branch -d $branchName; }; f' | |
# |
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 | |
# run: | |
# bash <(curl -fsSL <url-to-gist>) | |
apt-get update \ | |
&& apt-get upgrade -y | |
bash <(curl -fsSL https://get.docker.com ) | |
curl -L https://github.com/docker/compose/releases/download/1.28.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose \ |
OlderNewer