Skip to content

Instantly share code, notes, and snippets.

Avatar

Anthony Van de Gejuchte avdg

View GitHub Profile
View es6.ebnf
/* ebnf file for es 6 - MAY CONTAIN ERRORS / DISAMBIGUITY */
Grammer::= Statement
/* Lexical grammer */
SourceCharacter ::= #x0000-#x10FFFF
InputElementDiv ::= WhiteSpace | LineTerminator | Comment | CommonToken | DivPunctuator | RightBracePunctuator
InputElementRegExp ::= WhiteSpace | LineTerminator | Comment | CommonToken | RightBracePunctuator | RegularExpressionLiteral
InputElementRegExpOrTemplateTail ::= WhiteSpace | LineTerminator | Comment | CommonToken | RegularExpressionLiteral | TemplateSubstitutionTail
InputElementTemplateTail ::= WhiteSpace | LineTerminator | Comment | CommonToken | DivPunctuator | TemplateSubstitutionTail
WhiteSpace ::= "<TAB>" | "<VT>" | "<FF>" | "<SP>" | "<NBSP>" | "<ZWNBSP>" | "<USP>"
@avdg
avdg / gist:2210109
Created Mar 26, 2012
Bootstrap popover triggered by hover, fading away in few seconds
View gist:2210109
var tmp = null;
$('###selector###').popover({
trigger: 'manual',
title: 'testing',
delay: {show:500, hide:100}
});
$('###selector###').hover(function(){
clearTimeout(tmp);
View curl_get_contents.php
<?php
function curl_get_contents($url, $timeout = 30, $settings_array = array())
{
$return false;
if (function_exists("curl_init")) {
$curl_options = array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => intval($timeout),
CURLOPT_HEADER => false
View lotery.js
var probabilities = [500, 200, 50, 5];
var iterations = 2000;
var results = [];
next:
for (let i = 0; i < iterations; i++) {
let probability = Math.floor(Math.random() * 1000);
let j = 0;
@avdg
avdg / pullRequests.graphql
Created Jun 11, 2017
GraphQL Example to fetch pull requests information from mishoo/UglifyJS2
View pullRequests.graphql
{
repository(owner: "mishoo", name: "UglifyJS2") {
pullRequests(last: 100) {
nodes {
closed
number
}
totalCount
}
}
@avdg
avdg / Results.md
Created Apr 5, 2017
Test262 es 6 results for UglifyJS harmony branch
View Results.md
  • Uglify checkout c20bb99a62ad036368569bd89b934f52258429cd (harmony)
  • Test262 checkout 5da6f981e9c6eb6d8af9ad8be737fb2245cf2fdb (master)

process.versions:

{ http_parser: '2.7.0',
  node: '7.8.0',
  v8: '5.5.372.43',
 uv: '1.11.0',
@avdg
avdg / Results.md
Created Apr 3, 2017
Test262 es 6 results for UglifyJS harmony branch
View Results.md
  • Uglify checkout 35bae3fcd061cf736878b1005df62de15b727224 (harmony)
  • Test262 checkout 5da6f981e9c6eb6d8af9ad8be737fb2245cf2fdb (master)

process.versions:

{ http_parser: '2.7.0',
  node: '7.8.0',
  v8: '5.5.372.43',
 uv: '1.11.0',
@avdg
avdg / Results.md
Created Mar 30, 2017
Test262 es 6 results for UglifyJS harmony branch
View Results.md
  • Uglify checkout 12b56d9b48f7510afbb86327579a65efb5c3e171 (harmonyWith1701)
  • Test262 checkout 5da6f981e9c6eb6d8af9ad8be737fb2245cf2fdb (master)

process.versions:

{ http_parser: '2.7.0',
  node: '7.8.0',
  v8: '5.5.372.43',
 uv: '1.11.0',
@avdg
avdg / Results.md
Created Mar 17, 2017
Test262 es 6 results for UglifyJS harmony branch
View Results.md
  • Uglify checkout 2fd86d3cb02c2bcde81633c0096b308e2809ea00 (harmony)
  • Test262 checkout e4bbdba1059a871294dd25d305e4cab4b9c89f9e (master)

process.versions:

{ http_parser: '2.7.0',
  node: '7.7.3',
  v8: '5.5.372.41',
 uv: '1.11.0',
@avdg
avdg / Results.md
Created Mar 15, 2017
Test262 es 6 results for UglifyJS harmony branch
View Results.md
  • Uglify checkout 2fd86d3cb02c2bcde81633c0096b308e2809ea00 (harmony)
  • Test262 checkout e4bbdba1059a871294dd25d305e4cab4b9c89f9e (master)

process.versions:

{ http_parser: '2.7.0',
  node: '7.4.0',
  v8: '5.4.500.45',
 uv: '1.10.1',