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
javascript:(function () { | |
if (!document.getElementById('sun-maxplayer')) { | |
var style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.id = 'sun-maxplayer'; | |
style.appendChild(document.createTextNode(' | |
/* ZDF */ | |
html .page #skip-main .b-playerbox { width: 100vw; z-index: 999999999; transform: translate3d(-341.9px, 0px, 0px); } | |
html .page .scroll-arrow { display: none; } | |
html .b-header { position: static; } |
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
[user] | |
name = Firstname Lastname | |
email = firstname@netzstrategen.com | |
[core] | |
autocrlf = false | |
safecrlf = false | |
ignorecase = false | |
excludesfile = ~/.gitignore | |
[fetch] | |
prune = true |
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 | |
/** | |
* Gets queried node IDs and store them in a static variable. | |
* | |
* Implements hook_views_post_execute(). | |
*/ | |
function custom_views_post_execute($view) { | |
if ($view->id() !== 'taxonomy_term') { | |
return; |
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 get_template_directory() . '/inc/init.php'; |
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 | |
namespace Vendor\Mine; | |
function hook_name($value) { | |
return $value; | |
} | |
add_filter('hook_name', __NAMESPACE__ . '\hook_name'); |
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
# Replace `define('...', '...');` with `const ... = ...;` | |
:%s/define( *'\(\w*\)',\( *\)'\([^']*\)' *);/const \1 =\2'\3';/ | |
# Replace `isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] :` with `$_SERVER['SERVER_NAME'] ??` | |
# Using different delimiters to match an underscore literally. | |
:%s!isset.*SERVER_NAME.*:!$_SERVER['SERVER_NAME'] ??! | |
# Convert line endings to Linux/Unix | |
:set ff=unix |
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
### Keybase proof | |
I hereby claim: | |
* I am sun on github. | |
* I am sun (https://keybase.io/sun) on keybase. | |
* I have a public key whose fingerprint is 1292 4213 3E34 D0B0 68A6 DE4D 0AA6 11AF B3CA F936 | |
To claim this, I am signing this object: |
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 | |
$list = new SplDoublyLinkedList(); | |
// Comment this out to make it behave. | |
$list->setIteratorMode(SplDoublyLinkedList::IT_MODE_LIFO); | |
$list->push('one'); | |
$list->push('two'); | |
foreach ($list as $key => $value) { |
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 | |
# Simple PHP 5.4+ bench script for CLI. | |
const ITERATIONS = 1000; | |
const ARRAY_SIZE = 1000; | |
define('CONDITION', 'item' . (ARRAY_SIZE - 1)); | |
error_reporting(E_ALL | E_STRICT); | |
setlocale(LC_ALL, 'C'); | |
register_shutdown_function(function () { |
NewerOlder