Skip to content

Instantly share code, notes, and snippets.

@super3
super3 / readme.md
Last active July 21, 2020 11:03 — forked from jimmywarting/readme.md
Cors Proxies
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
@jimmywarting
jimmywarting / readme.md
Last active April 30, 2024 21:38
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@benhoyt
benhoyt / birthday_probability.py
Created August 5, 2016 18:27
"Birthday problem" calculator in Python
"""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:
@brigand
brigand / git.md
Created October 6, 2014 02:50
My Git Aliases

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`'
@MoOx
MoOx / svgicon.css
Last active December 3, 2018 08:50
Svg icons with React.js with webpack loader (svg: raw-loader)
.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;
@jmosbech
jmosbech / webstorm-jsx.md
Created January 25, 2014 23:09
WebStorm and JSX

Webstorm and JSX

// 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:
@gre
gre / Makefile
Created February 4, 2013 20:06
Tiny Makefile to build your Javascript libraries with Closure Compiler minification via Cloud. ( see also http://blog.greweb.fr/?p=1713 )
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)
@egermano
egermano / bubble.sort.js
Created September 11, 2012 15:17
Bubble Sort
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;
@gre
gre / easing.js
Last active April 30, 2024 04:58
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* 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 = {