Skip to content

Instantly share code, notes, and snippets.

View leobalter's full-sized avatar
💭
status

Leo Balter leobalter

💭
status
View GitHub Profile
@caiolima
caiolima / gist:d7c538fa936dc62ed3cd7841bbe04dc3
Created March 6, 2017 01:15
Running JSC on test262-harness
First you need to build JSC. Since it is a module in WebKit, you can follow these instructions to get the code and learn how to build it.
https://webkit.org/getting-started/#building-webkit
After the machine setup, you can build JSC as a stand-alone CLI program running
```<path_to_webkit>/Tools/Scripts/build-jsc —release```
It will build jsc into ```<path_to_webkit>/WebKitBuild/Release```
@leobalter
leobalter / gist:57283b496d281d92cc159827fde4250c
Last active May 10, 2017 15:00
test262-harness shortcuts
test262-harness --hostPath=`which d8` --hostType=d8 --hostArgs='--harmony_regexp_property' $(git diff --cached tc39/master --diff-filter=AM --name-only test/) -t 4
test262-harness --hostPath=`which d8` --hostType=d8 $(git diff --name-only)
test262-harness $(git grep --name-only --extended-regexp 'verify(Not)?Enumerable' test/) # uses node by default
test262-harness --hostPath=`which d8` --hostType=d8 $(git diff --cached --name-only) # added files only
time test262-harness --hostType=jsshell -t 4 --hostPath=`which js` $(git grep --name-only -E 'features\: \[*+object-(rest|spread)' test/language)
@guifromrio
guifromrio / front-end-brasil.md
Last active July 15, 2017 12:20
O estado da comunidade brasileira de front end

Para onde caminha a comunidade brasileira de front end?

Hoje algo cômico e surreal aconteceu na comunidade FrontEnd Brasil. Algo chocante a ponto de desanimar o mais engajado dos participantes.

Após postar um Gist sobre moment com um código bastante didático, Berger foi rechaçado pelo moderador da comunidade, Jean Carlo Nascimento. Ao notar que o gist era escrito em CoffeeScript, o moderador comentou uma piadinha:

Prefiro usar moment a coffee.

A comunidade não gostou e reagiu, criticando o comentário infeliz e prezando o autor por compartilhar um código útil. Não satisfeito, as agressões sobre o uso de CoffeeScript continuaram.

Qual o resultado para:
// 1:
{}+{} // ?
// 2:
({}+{}) // ?
@leobalter
leobalter / asshole.js
Created May 30, 2011 04:48 — forked from Kilian/annoying.js
How to be an asshole
/**
* Annoying.js - How to be an asshole to your users
*
* DO NOT EVER, EVER USE THIS.
*
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com)
* Visit https://gist.github.com/767982 for more information and changelogs.
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors
*
@Kilian
Kilian / annoying.js
Created January 6, 2011 15:04
How to be an asshole
/**
* Annoying.js - How to be an asshole to your users
*
* DO NOT EVER, EVER USE THIS.
*
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com)
* Visit https://gist.github.com/767982 for more information and changelogs.
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors
*
@joemccann
joemccann / nginx + node setup.md
Created October 25, 2010 02:06
Set up nginx as a reverse proxy to node.js.

The idea is to have nginx installed and node installed. I will extend this gist to include how to install those as well, but at the moment, the following assumes you have nginx 0.7.62 and node 0.2.3 installed on a Linux distro (I used Ubuntu).

In a nutshell,

  1. nginx is used to serve static files (css, js, images, etc.)
  2. node serves all the "dynamic" stuff.

So for example, www.foo.com request comes and your css, js, and images get served thru nginx while everything else (the request for say index.html or "/") gets served through node.

  1. nginx listens on port 80.
@paulirish
paulirish / data-markdown.user.js
Last active February 6, 2024 10:41
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: