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
// Source: http://stackoverflow.com/a/987376/1461859 (http://jsfiddle.net/edelman/KcX6A/1506/) | |
jQuery.fn.selectText = function(){ | |
var doc = document | |
, element = this[0] | |
, range, selection | |
; | |
if (doc.body.createTextRange) { | |
range = document.body.createTextRange(); | |
range.moveToElementText(element); |
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
$(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
/** | |
* | |
* Here's a thing that will look through all the text nodes of a document, and | |
* upon encountering an emoji codepoint, will replace it with an image. | |
* For now, those images are pulled from GitHub, which isn't very nice, so I | |
* need to find a more suitable host. | |
* | |
* Much of this code was gleaned from staring at the minified GitHub JS. | |
* | |
* Copyright (c) 2013 Mark Wunsch. Licensed under the MIT License. |
OlderNewer