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
jQuery('a.menu-link').click(function(e){ | |
e.preventDefault(); | |
var href= jQuery(this).attr("href"); | |
jQuery('html, body').animate({ | |
scrollTop: jQuery(href).offset().top - 50}, 1000); }); |
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
.no-select { | |
-webkit-touch-callout: none; | |
-webkit-user-select: none; | |
-khtml-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} |
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
<?php | |
require_once "./includes/password.inc"; | |
//connect to Drupal 6 database | |
//syntax:mysqli(hostname,username,password,databasename); | |
$db= new mysqli('localhost','root','rootpwd','db'); | |
if(mysqli_connect_errno()) { | |
echo "Conection error. Could not connect to Drupal 6 site!"; | |
exit; |
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
#!/usr/bin/python | |
from subprocess import * | |
from binascii import * | |
import sys | |
import os | |
def sO(y): | |
rr = hexlify(unhexlify('%0256x' % y)) | |
#print rr[0:4] |
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 some reason, the change() event only fires when the input field loses focus. | |
Binding to other options ('change keypress paste focus textInput input') will | |
fire the event several times, which is bad. The below code works even when | |
content is pasted into the text field, and only fires once as expected. | |
*/ | |
$('#search-form .term').bind('input', function(){ | |
console.log('this actually works'); | |
}); |
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 extendedEuclid(a,b): | |
#print 'extendedEuclid of ',a,b | |
if b==0: | |
return (a,1,0) | |
tuplPrime = extendedEuclid(b,a % b) | |
return [tuplPrime[0], tuplPrime[2], (tuplPrime[1] - (a//b)*tuplPrime[2])] | |
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 update | |
sudo apt-get install apt-transport-https ca-certificates | |
# Add new GPG key | |
sudo apt-key adv \ | |
--keyserver hkp://ha.pool.sks-keyservers.net:80 \ | |
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
# If the above keyserver is not available, try hkp://pgp.mit.edu:80 or hkp://keyserver.ubuntu.com:80. |
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
#!/usr/bin/env bash | |
set -e | |
EXITCODE=0 | |
# bits of this were adapted from lxc-checkconfig | |
# see also https://github.com/lxc/lxc/blob/lxc-1.0.2/src/lxc/lxc-checkconfig.in | |
possibleConfigs=( | |
'/proc/config.gz' |
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
#!/usr/bin/env bash | |
set -e | |
EXITCODE=0 | |
# bits of this were adapted from lxc-checkconfig | |
# see also https://github.com/lxc/lxc/blob/lxc-1.0.2/src/lxc/lxc-checkconfig.in | |
possibleConfigs=( | |
'/proc/config.gz' |
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
{"EndpointGroups":[{"name":"Group1","Policies":[{"name":"Policy1","Rules":[{"name":"Rule1","protocol":"tcp","port":"22","direction":"out","ip-address":"0.0.0.0"}]}]}]} |
OlderNewer