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
wget -O /tmp/SA-CORE-2014-005-D7.patch https://www.drupal.org/files/issues/SA-CORE-2014-005-D7.patch && chmod 0600 /tmp/SA-CORE-2014-005-D7.patch | |
cd /var/www | |
find -path '*/includes/database/database.inc' | |
#make backups | |
for f in $( find -path '*/includes/database/database.inc' ); do cp -av $f $f.backup-$(date +"%Y-%m-%d-%H%M%S"); done | |
#dry run | |
for f in $( find -path '*/includes/database/database.inc' ); do patch --dry-run $f < /tmp/SA-CORE-2014-005-D7.patch; 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
/* result: http://i.imgur.com/PfutWmN.gif */ | |
t=sin($t*180); /* $t==0 && t==0, $t==0.5 && t==1, $t==1 && t==0 */ | |
n=t*.5; | |
for(l = [0:3]){ /* = 4 layers */ | |
translate([n*(1.1*l)+(.1*l),0,0]) cube([.1,1,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
'use strict'; | |
angular.module("ngLocale", [], ["$provide", function($provide) { | |
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; | |
function getDecimals(n) { | |
n = n + ''; | |
var i = n.indexOf('.'); | |
return (i == -1) ? 0 : n.length - i - 1; | |
} | |
function getVF(n, opt_precision) { |
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
<!DOCTYPE> | |
<html> | |
<head> | |
<title>Selenium Test Example Page</title> | |
</head> | |
<body style="margin: 20px" onload="checkParams()"> | |
<h2>Selenium Test Example Page</h2> | |
<p id="intro"> |
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
# curl https://gist.githubusercontent.com/piccaso/431d30e5c979e3d2ba1f/raw | bash | |
# related: http://bit.ly/1AJNMRA http://git.io/vk9it | |
# clone somewhere... | |
cd `mktemp -d` && git clone https://git.typo3.org/Packages/TYPO3.CMS.git && cd TYPO3.CMS/ | |
{ | |
# setup/reset | |
WORKINGBRANCH="TYPO3_7-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
jQuery(document).ready(function($){ | |
'use strict'; | |
function nurseLinks(){ | |
$('a').each(function(i,e){ | |
function trySel(sel){ | |
if($(sel).length > 0){ $(e).attr('href', sel); return true; } | |
return false; | |
} | |
var h = e.hash.toString().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
VBoxManage.exe internalcommands createrawvmdk -filename "%1-linked.vmdk" -rawdisk "%1" | |
@pause |
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 | |
function parse_austrian_date($date,$output='U'){ | |
$date = DateTime::createFromFormat('d.m.Y H:i', $date); | |
if($date === false) return false; | |
return $date->format($output); | |
} | |
echo parse_austrian_date('1.2.12 24:14','d.m.Y H:i:s'); |
OlderNewer