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> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<!--[if lt IE 9]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
</head> | |
<body> |
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 numShown = 15; // Initial rows shown & index | |
// Hide rows and add clickable div | |
$('.cinematiclist').find('tr:gt(' + (numShown - 1) + ')').hide().end().append('<tr id="cinematicmore"><td colspan="4" style="cursor:pointer; text-align:center;">Zeige alle</td></tr>'); | |
// onclick remove trigger an show full table | |
$('#cinematicmore').click(function(){ | |
$('#cinematicmore').remove(); | |
// Show all |
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
// ------------------- | |
// Hide Category from Public | |
// ------------------- | |
add_filter('posts_where', 'private_category'); | |
function private_category($where) { | |
$cat_id = "12" // Change Category ID | |
if( is_admin() OR is_user_logged_in() ) { | |
return $where; // show Posts | |
}else{ |
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
;(function(){ | |
var azurScript = {}, | |
scriptDatastore = []; | |
azurScript.add = function(path, callback) { | |
scriptDatastore.push({path: path, callback: callback}); | |
}; | |
azurScript.exec = function() { |
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/php | |
<?php | |
$temp = array(); | |
$folder = "squid/"; // http://proxyserver.de/$folder/ | |
$wwwpath = "/var/www/"; // eg. /var/www/ | |
stream_set_timeout(STDIN, 86400); // Extend stream timeout to 24 hours | |
if(!file_exists($wwwpath.$folder)) { | |
mkdir ($wwwpath.$folder); |
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
test |
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
/* Mobile first */ | |
/* --- >= smartphones landscape --- */ | |
@media screen and (min-width: 480px) { | |
} | |
/* --- >= tablets portrait --- */ | |
@media screen and (min-width: 768px) { | |
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
$(function() { | |
var data = location.hash.substring(1); | |
data = Base64.decode(data); | |
genQR(data); | |
$('#in').val(data); | |
$('#in').bind('keyup', function() { | |
var data = $(this).val(); | |
genQR(data); |
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
/* GCD */ | |
function gcd (a, b) { return (b == 0) ? a : gcd (b, a%b); } // Source: http://stackoverflow.com/a/1186465 | |
/* ratio is to get the gcd and divide each component by the gcd, then return a string with the typical colon-separated value */ | |
function ratio(x,y) {c=gcd(x,y); return ""+(x/c)+":"+(y/c)} | |
ratio(1920,1080) | |
/* "16:9" */ | |
ratio(320,240) | |
/* "4:3" */ |
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 a in $(ls -1 *.txt); do echo $a; done |