Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
private static readonly string[] tenHoursOfFun = | |
{ | |
"https://www.youtube.com/watch?v=wbby9coDRCk", | |
"https://www.youtube.com/watch?v=nb2evY0kmpQ", | |
"https://www.youtube.com/watch?v=eh7lp9umG2I", | |
"https://www.youtube.com/watch?v=z9Uz1icjwrM", | |
"https://www.youtube.com/watch?v=Sagg08DrO5U", | |
"https://www.youtube.com/watch?v=5XmjJvJTyx0", | |
"https://www.youtube.com/watch?v=IkdmOVejUlI", | |
"https://www.youtube.com/watch?v=jScuYd3_xdQ", |
#define BOOST_TEST_MODULE subcommand options | |
#include <boost/test/unit_test.hpp> | |
#include <boost/program_options.hpp> | |
#include <boost/variant/variant.hpp> | |
#include <boost/variant/get.hpp> | |
struct GenericOptions { | |
bool debug_; | |
}; |
<?php declare(strict_types=1); | |
require_once "✨.🐘"; | |
✨($_)->strlen("foo")->var_dump($_); |
import * as crypto from 'crypto'; | |
import * as fs from 'fs'; | |
import * as path from 'path'; | |
/** | |
* Interface for Webpack's hashFunction | |
*/ | |
export interface IHashFunction { | |
update: (data: string | Buffer, encoding: string) => IHashFunction; | |
digest: (encoding: string) => string | Buffer; |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
/** | |
* The target language. [Browser support is good][1] but "en-US" is a safe default. | |
* | |
* [1]: https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/language | |
* | |
* @type {string} | |
*/ | |
const { language = "en-US" } = navigator; | |
/** |
log4j.debug=false | |
# Default level is INFO | |
log4j.rootLogger=INFO,StdoutErrorFatal,StdoutWarn,StdoutInfo,StdoutDebug,StdoutTrace | |
# and for com.some.package.* log everything | |
log4j.logger.com.some.package=TRACE | |
log4j.appender.StdoutErrorFatal=org.apache.log4j.ConsoleAppender | |
log4j.appender.StdoutErrorFatal.layout=org.apache.log4j.PatternLayout |
<?php | |
function flattenExceptionBacktrace(\Exception $exception) { | |
$traceProperty = (new \ReflectionClass('Exception'))->getProperty('trace'); | |
$traceProperty->setAccessible(true); | |
$flatten = function(&$value, $key) { | |
if ($value instanceof \Closure) { | |
$closureReflection = new \ReflectionFunction($value); | |
$value = sprintf( | |
'(Closure at %s:%s)', |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes: