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
@media print { | |
h2, h3, h4, h5, h6 { break-after: avoid-page; } | |
img, svg, table, canvas { break-inside: avoid; } | |
a::after { content: " (" attr(href) ")"; } | |
} |
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 spintax($text) { | |
$max = substr_count($text, '}'); | |
$i = 0; | |
$currentPos = 0; | |
while ($currentPos < strlen($text) && ($endPos = strpos($text, '}', $currentPos)) !== false) { | |
if ($i++ > $max) break; |
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 | |
// Small hackable Mustache inspired templating | |
function alaMustache($template, array $values = []){ | |
$pattern = '/{{(?<BOOLEAN>#|\^)\s*(?P<KEY>[\w\.-]+)\s*}}(?P<BLOCK>.*?)({{\/\s*\2\s*}})/ms'; | |
$template = preg_replace_callback($pattern, function (array $matches) use ($values) { | |
if ($matches['BOOLEAN'] === '#') { | |
if (array_key_exists($matches['KEY'], $values) && !empty(trim($values[$matches['KEY']]))) { | |
return $matches['BLOCK']; |
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
html{ | |
filter: invert(1) hue-rotate(.5turn); | |
} |
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
// extending https://raw.githubusercontent.com/dcodeIO/node.js-closure-compiler-externs/master/process.js | |
// use together with | |
// @externs_url https://gist.githubusercontent.com/mathiasrw/a5696b591b439e55c052e9399028a274/raw/f878549e25646d0c9b2e5191b9c455ac2f662a0c/Closure%2520compiler%2520node%2520externs.js | |
/* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.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
npm audit | ggrep -oP '(?<=# Run..).+(?=..to resolve)' |
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
package main | |
import ( | |
"bufio" | |
"encoding/hex" | |
"fmt" | |
"github.com/btcsuite/btcutil/base58" | |
"log" | |
"os" | |
) |
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 node | |
process.stdin.resume(); | |
process.stdin.setEncoding('utf8'); | |
process.stdin.on('data', function(data) { | |
process.stdout.write(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
env LC_CTYPE=C tr -dc "A-Z0-9" < /dev/urandom | fold -w 81 | head -n 1 > myIotaSeed.txt |
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('#details-module').hide(); | |
jQuery('#viewissuesidebar').hide(); | |
jQuery('.command-bar').hide(); | |
jQuery('#page').replaceWith(jQuery('.content')); | |
jQuery('.issue-view').css('overflow-y','visible'); |
NewerOlder