- This doc - https://gist.github.com/paf31/80fdea566b0f7cfefadd
- About me
- About you
- About PureScript
- Features
- Type Inference
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
(function x(){"use strict"; x = 1;}()); // TypeError | |
(function x(){x = 1; return x !== 1;}()); // write fails silently; function returns true | |
(function x(){"use strict"; x = (function(){throw 0;})();})() // Error 0 | |
// These three lines rely on ES6. | |
(function x(){const x = 1;})() // No-op. In particular, not a redeclaration of x. | |
(function (){"use strict"; const x = 1; x = 2;})() // TypeError | |
(function (){const x = 1; x = 2;})() // TypeError. contrast (function x(){x = 2;}()); |
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
#include <stdio.h> | |
int main() { | |
int *p = 0; | |
char line[1024]; | |
printf("> "); | |
fgets(line, 1024, stdin); | |
*p = 12; |
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
fs = require 'fs' | |
esprima = require 'esprima' | |
escope = require 'escope' | |
eslevels = require 'eslevels' | |
js = (fs.readFileSync './input.js').toString() | |
ast = esprima.parse js, {range: yes} | |
scopes = (escope.analyze ast).scopes |
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
Q = require './q' | |
class exports.Task | |
constructor: (@promise) -> | |
value: null | |
reason: null | |
result: -> | |
unless @promise.isResolved() |
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
# config/initializers/source_maps.rb | |
if Rails.env.development? | |
require 'open3' | |
module CoffeeScript | |
class SourceMapError < StandardError; end; | |
class << self | |
def map_dir |
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
var module = (function (exports) { | |
var NameSequence, | |
ZeroSequenceCache; | |
NameSequence = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''); | |
ZeroSequenceCache = []; | |
function stringRepeat(str, num) { | |
var result = ''; |
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
:%s/[\r \t]\+$// | |
:%s/() ->/->/c | |
:%s/if \!/unless /c | |
:%s/;$//c | |
:%s/^\(\s*\)\(@\?[a-z0-9$_]\+\)()/\1do \2/ic | |
:%s/\!==?/isnt/c | |
:%s/===\?/is/c | |
:%s/\([a-z0-9$_]\)(\([^)]\+\))$/\1 \2/ic | |
:%s/true/yes/c | |
:%s/false/no/c |
Most active GitHub users (git.io/top)
The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.
Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:
githubUsers
.filter(user => user.followers > 1000)
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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
NewerOlder