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 objectLiteral = { | |
name: 'bilbo', | |
surname: 'bagins' | |
}; | |
for(var key in objectLiteral){ | |
if(objectLiteral.hasOwnProperty(key)){ | |
console.log('key: ' + key); | |
console.log('value: ' + objectLiteral[key]); | |
} |
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 literal = {'if' : 'it', 'fits' : 'i', 'sits' : ''}; | |
console.log(literal); | |
console.log('literal is: ' + literal); | |
console.log('literal is: ', literal); |
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
[gist]https://gist.github.com/hoto/9c89e66e2a5848c5a25f[/gist] |
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
git branch -r --merged | | |
grep origin | | |
grep -v '>' | | |
grep -v master | | |
grep -v release | | |
grep -v develop | | |
xargs -L1 | | |
awk '{split($0,a,"/"); print a[2]}' | | |
xargs git push origin --delete |
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
LIST=`fleetctl list-machines | grep worker | awk '{print $2}'` | |
for item in $LIST; do echo $item; done | |
for item in $LIST; do ssh -A core@$item; done |
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
https://wiki.archlinux.org/index.php/Dm-crypt/Device_encryption | |
cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-random --verify-passphrase luksFormat <device> | |
cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-random --verify-passphrase luksFormat /dev/sda3 |
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
lsblk #only the one with 'luks' are encrypted | |
#NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | |
#nvme0n1 259:0 0 238.5G 0 disk | |
#├─nvme0n1p3 259:3 0 20G 0 part | |
#│ └─luks-9e2bd0d0-9006-4b4b-b32e-dfd23a3bcceb | |
#│ 253:0 0 20G 0 crypt / | |
#├─nvme0n1p1 259:1 0 256M 0 part /boot/efi | |
#├─nvme0n1p4 259:4 0 217.2G 0 part | |
#│ └─luks-cf1d74d5-fed2-43bb-b759-06e9a417c30b |
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
# GIT CLONE MIRROR FIRST FOR BACKUP | |
git clone --mirror git@... | |
# REMOVE ALL BRANCHES FROM REMOTE BUT LEAVE THOSE WHICH MRs ARE STILL OPEN | |
git branch --all | \ | |
/bin/grep -v -E "develop|release|master|production|mcc-123-somebranch" | \ | |
cut -d"/" -f3 | \ | |
xargs -n1 git push origin --delete |
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 ip in $(fleetctl list-machines | cut -f 2); \ | |
do ssh core@$ip bash -c "hostname && free -mh | head -n 2"; \ | |
done | grep -E "worker|\$" |
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
- name: kernel and python-chardet updates are disabled | |
replace: | |
path: /etc/dnf/dnf.conf | |
regexp: '(\s+exclude=.*)$' | |
replace: '\1 kernel* python-chardet' | |
become: yes |
OlderNewer