Server | SSL | Metods | Server country code | Comments |
---|---|---|---|---|
[YaCDN][1] | ✅ | GET | EU | Unlimited size and unlimited requests (for now) |
[crossorigin.me][2] | ✅ | GET | US | Require Origin header 2MB size limit |
[cors-proxy.htmldriven][3] | ✅ | - | CZ | JSON response don't work well with binary |
[cors-proxy.taskcluster][4] | ✅ | POST | US | Only witelisted to taskcluster.net Can send any header/method |
[thingproxy][9] | ✅ | ANY | US | Limited to 100kb for both upload and download, max 10 req/sec |
[whateverorigin][10] | ❌ | GET | US | Only supports JSONP |
[cors.io][11] | ✅ | GET, HEAD | US | Only supports GET and HEAD request |
[gobetween][12] | ✅ | GET | US | Only supports GET requests |
Service | SSL | status | Response Type | Allowed methods | Allowed headers |
---|
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
"""Calculate the probability of generating a duplicate random number after | |
generating "n" random numbers in the range "d". | |
Usage: python birthday_probability.py n [d=365] | |
Each value can either be an integer directly, or in the format "2**x", where | |
x is the number of bits in the value. | |
For example, to calculate the probability that two people will have the same | |
birthday in a room with 23 people: |
I use git a lot for work and other projects, so I invested the time in creating some high quality aliases that really work for me. These just go in your bash profile (~/.bash_profile or ~/.bashrc or ~/.profile depending on your OS).
I see a lot of people go overboard with aliases, and then end up not using them. They're meant to cover 95% of the commands I use, not 100%.
alias gcam='git commit -am'
alias gs='git status'
alias gplr='git pull --rebase'
alias gpsh='git push'
alias gpo='git push -u origin `git symbolic-ref --short HEAD`'
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
.SVGIcon { | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
/* fix webkit/blink poor rendering issues */ | |
transform: translate3d(0,0,0); | |
/* it's better defined directly because of the cascade shit | |
width: inherit; | |
height: inherit; |
- make sure the WebStorm "Textmate bundles support" plugin is enabled
- download the Textmate bundle from https://github.com/andrespagella/JSX-TextMate-Bundle
- replace /Syntaxes/JSX.tmLanguage with this https://github.com/yungsters/sublime/blob/master/tmLanguage/JavaScript%20(JSX).tmLanguage (presumeably better?)
- add the textmate bundle to WebStorm
- make sure the *.jsx extension is handled by "Files supported via Textmate bundles"
- in case of color issues: you need to map your WebStorm scheme to a Textmate scheme. The Textmate color schemes are stored in .WebStorm7\config\plugins\textmate\lib\themes (on windows) and can be pruned to get rid of weird background artifacts
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
// simpler, faster, version that will throw a TypeError if the path is invalid | |
// by yorick | |
function extract(obj, key){ | |
return key.split('.').reduce(function(p, c) {return p[c]}, obj) | |
} | |
extract | |
// for example: |
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
LIB=myLib.min.js | |
all: $(LIB) | |
%.min.js: %.js | |
@curl -d compilation_level=SIMPLE_OPTIMIZATIONS -d output_format=text -d output_info=compiled_code --data-urlencode "js_code@$<" http://closure-compiler.appspot.com/compile > $@ | |
clean: | |
@rm $(LIB) |
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 bubbleSort(values) { | |
var length = values.length - 1; | |
do { | |
var swapped = false; | |
for(var i = 0; i < length; ++i) { | |
if (values[i] > values[i+1]) { | |
var temp = values[i]; | |
values[i] = values[i+1]; | |
values[i+1] = temp; | |
swapped = true; |
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
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
NewerOlder