Code review one person reading over another's code and offering comments, suggestions, and feedback about how it could be improved. Often this is done at companies or in open source projects as a required step before proposed changes can be merged into a
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
/* dragging logic for nomadlist.com/dating */ | |
/* by @levelsio */ | |
/* MIT license */ | |
/* <dragging logic> */ | |
$('body').on('mousedown touchstart','.card',function(e) { | |
if(!currentCardUserId) return; | |
if($('card.match_card').is(':visible')) return; | |
if(typeof e.originalEvent.touches !=='undefined') { | |
/* touch device */ |
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
// Simple, Useful and Slow | |
// Assorted Reference Statistics Functions | |
// UTF-8 Edition | |
// Shorthands | |
pow = Math.pow | |
sqrt = Math.sqrt | |
pi = Math.PI |
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
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
UTF-8 encoded sample plain-text file | |
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ | |
Markus Kuhn [ˈmaʳkʊs kuːn] <http://www.cl.cam.ac.uk/~mgk25/> — 2002-07-25 CC BY | |
The ASCII compatible UTF-8 encoding used in this plain-text file | |
is defined in Unicode, ISO 10646-1, and RFC 2279. |
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
*.cbor | |
*.log | |
*.xml | |
*.yaml | |
*.json | |
*.msgpack | |
*.html | |
*.marshal | |
*.pickle | |
.tox |
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
#!/bin/bash | |
#------------------------------------------------------------------------------- | |
# download/unpack componentry for N|Solid into ~/nsolid | |
#------------------------------------------------------------------------------- | |
# updates: | |
# 2016-05-04 print note about officially supported "Download All" tarball | |
# 2016-02-10 change to get N|Solid versions dynamically from index.tab | |
# 2016-02-10 upgrade to N|Solid 1.2.1 | |
# 2016-01-12 upgrade to N|Solid 1.2.0 |
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
defmodule HelloPhoenix.Memcached.Supervisor do | |
use Supervisor | |
def start_link do | |
Supervisor.start_link(__MODULE__, []) | |
end | |
def init([]) do | |
pool_options = [ | |
name: {:local, :memcached_pool}, |
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
let Ym = (f, s = JSON.stringify) => (g => g(g))(x => f((...v) => (k => k in x ? x[k] : x[k] = x(x)(...v))(s(v)))) | |
let fib = Ym(f => n => n <= 1 ? n : f(n - 1) + f(n - 2)) | |
console.log('fib(1000)', fib(1000)) // => 4.346655768693743e+208 |
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
if [[ $# -ne 2 ]] | |
then | |
echo "usage : $0 <outputFile> <repo>" | |
exit 1 | |
fi | |
outputFile=$1 | |
repo=$2 | |
rm $outputFile | |
cd $repo | |
git checkout master |
NewerOlder