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 | |
#create snapshots of all volumes | |
aws ec2 describe-volumes | grep VOLUMES | cut -f 7 | while read volumeid; do aws ec2 create-snapshot --volume-id=$volumeid --description="daily-for-automatical-deletion" ; done | |
#delete all but the last 35 (if 5 volumes, this is keeping the daily automatic backups for the last 7 days) | |
aws ec2 describe-snapshots --owner-id=<insert-owner-id> --filters Name=description,Values="*for-automatical-deletion" | grep SNAPSHOTS | sort -r -k 6 | sed -n 35,1000p | cut -f 5 | while read snapshotid; do aws ec2 delete-snapshot --snapshot-id=$snapshotid; 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
for file in *; do newname="$(cat $file | head -2 | tail -1 | cut -f 3 -d '[' | cut -d '(' -f 1).sublime-snippet"; mv "$file" "$newname"; 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
var eventually = { | |
expect: function(promise) { | |
function notBe(expectedValue) { | |
return promise.then(function(eventualValue) { | |
expect(eventualValue).not.to.be(expectedValue); | |
}); | |
} | |
function be(expectedValue) { |
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
<style> | |
table { | |
width:100%; | |
} | |
@media (max-width: 500px) { | |
table tr th { | |
float:left; | |
width:50%; | |
clear:left; | |
} |
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
fail: function fail(message) { | |
var error = new Error(message); | |
error.name = this.failException || assert.failException; | |
try{ | |
throw error; | |
} catch(e) { | |
if (error.stack){ | |
console.log(error.stack); | |
error.stack = error.stack.split('\n').slice(0,20).join('\n') |
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
{ | |
"adresse": "MARIDALSVEIEN 2", | |
"tiltak": { | |
"beslutningsTre": { | |
"id": "5", | |
"label": "Tiltaksliste ved bevaringsverdig eiendom", | |
"multipleSelect": true, | |
"beslutninger": [{ | |
"id": "6", | |
"label": "Bytte vindu eller dør", |
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-get install --no-install-recommends mutter | |
mutter --replace |
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
Section "ServerLayout" | |
Identifier "layout" | |
Screen 0 "nvidia" | |
Inactive "intel" | |
EndSection | |
Section "Device" | |
Identifier "intel" | |
Driver "intel" | |
BusID "PCI:0@0:2:0" |
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
update-alternatives: using /usr/lib/nvidia-349-prime/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode | |
update-alternatives: using /usr/lib/nvidia-349-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode |
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-get install python-setuptools | |
sudo easy_install pygments | |
echo "alias ccat='pygmentize -O style=monokai -f console256 -g'" >> ~/.bashrc |
OlderNewer