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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 remote set-url origin $(echo "git@bitbucket.org:<TEAM>/$(git remote -v | grep -oh "[^/]*\.git" | head -n1)") |
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
upstream blah_cluster { | |
server ip; | |
} | |
server { | |
server_name blah; | |
access_log /srv/logs/blah.log; | |
error_log /srv/logs/blah-error.log; |
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 | |
DIR="$(cd "$(dirname "$0")" && pwd)" | |
echo "Running N'SIQ on" $1 | |
echo "===========================================" | |
$DIR/nsiqcppstyle/nsiqcppstyle -f $DIR/profiles/nsiq-profile.txt $1 | |
echo "" | |
echo "===========================================" | |
echo "N'SIQ finished" | |
echo "Now running vera++ on" $1 |
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
def matrixMul(A, B): | |
TB = list(zip(*B)) | |
return [[sum(ea*eb for ea,eb in zip(a,b)) for b in TB] for a in A] | |
def pivotize(m): | |
"""Creates the pivoting matrix for m.""" | |
n = len(m) | |
ID = [[float(i == j) for i in range(n)] for j in range(n)] | |
r = 0 | |
for j in range(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
setInterval(function(){ | |
window.frames[0].document.querySelectorAll(".thechosenone")[0].style.backgroundColor = 'white'; | |
},1500) |
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
enquire.register("screen and (max-width:803px)",{ | |
match: function(){ | |
//code to do when the media query matches | |
}, | |
unmatch: function(){ | |
//code do do when the media query does not match | |
} | |
}); |
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
private void CreateButtons() | |
{ | |
int y = 50;//y-hnit takkans | |
int x = 0;//x-hnit takkans | |
int width = 35;//Breidd takkans | |
int height = 35;//Hæð takkans | |
int xMargin = 3;//x - Margin takkans | |
int yMargin = 3;//y - Margin takkans |
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
/** | |
* Circular Tooltip (SO) | |
* http://stackoverflow.com/q/13132864/1397351 | |
*/ | |
* { margin: 0; padding: 0; } | |
body { | |
overflow: hidden; | |
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg); | |
} | |
/* generic styles for button & circular menu */ |
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/python | |
# Head ends here | |
def displayPathtoPrincess(n,grid): | |
#Find where you are, and where the princess is | |
princessX, princessY = findInArray('p',n,grid) | |
princeX, princeY = findInArray('m',n,grid) | |
if princessY > princeY: | |
print '\n'.join(["DOWN"] * (princessY-princeY)) | |
elif princeY > princessY: |
OlderNewer