Skip to content

Instantly share code, notes, and snippets.

Avatar

Mikola Lysenko mikolalysenko

View GitHub Profile
@piscisaureus
piscisaureus / pr.md
Created Aug 13, 2012
Checkout github pull requests locally
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@substack
substack / cities
Last active Oct 31, 2020
top cities for npm modules from the 572 top module publishers with locations set on github and a matching github and npm username
View cities
[ 'San Francisco, CA, US', 1857 ]
[ 'Oakland, CA, US', 924 ]
[ 'London, ENG, GB', 511 ]
[ 'New York City, NY, US', 482 ]
[ 'Madison, WI, US', 444 ]
[ 'Hangzhou, CN', 439 ]
[ 'Sydney, AU', 435 ]
[ 'Copenhagen, DK', 305 ]
[ 'Melbourne, AU', 254 ]
[ 'Boston, MA, US', 254 ]
@debasishg
debasishg / gist:8172796
Last active Sep 15, 2021
A collection of links for streaming algorithms and data structures
View gist:8172796
  1. General Background and Overview
@substack
substack / dotslashtaskdotjs.markdown
Created Jan 8, 2014
introducing ./task.js, THE new javascript task runner automation framework
View dotslashtaskdotjs.markdown

why ./task.js?

One word: task automation. It's basically zero effort and you can use the ./task.js package manager to handle any repetitive tasks. You can use ./task.js to automate everything with minimum effort.

./task.js provides the structure, order, and authority that you as a developer so desperately crave. ./task.js will also take responsibility for your actions if you need it to. It's what everybody is using now. ./task.js is the new hotness. It's all about ./task.js now, just like that.

This is compared to npm run/bash scripts, which are:

@hsribei
hsribei / putting-the-tor-back-in-torrent.md
Last active Jan 18, 2017
Putting the "Tor" back in Torrent
View putting-the-tor-back-in-torrent.md

Putting the "Tor" back in Torrent

How a Popcorn Time fork patch could incentivize people to run thousands of new Tor relays

This is a follow-up to this discussion: Can NAT traversal be Tor's killer feature?

If torrents are P2P's killer application, and NAT traversal/"static IP" are Tor's (via hidden services), putting them together could prove to be the best incentivization scheme for growing the Tor network other than cold crypto cash.

You're stupid

Everybody knows you're not supposed to use torrents with tor, right?

@mathisonian
mathisonian / index.md
Last active Feb 23, 2021
requiring npm modules in the browser console
View index.md

demo gif

The final result: require() any module on npm in your browser console with browserify

This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.

Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: https://github.com/mathisonian/requirify/issues/5

inspiration

View git-squash
#!/bin/sh
git rebase --interactive --autosquash \
$(git merge-base $(git symbolic-ref --short HEAD) master)
View using-reputation-systems.md

using reputation systems to create shared function-critical datastructures in open networks

Search engines, spam filtration, and p2p protocols - all need to rate the value of information. Search engines need it to provide good results; spam filtration needs it to exclude noise; and p2p networks need it for security and efficiency.

What is "value?" I'll use two dimensions:

  • Quality (how useful the information is). The more permissive participation is, the greater the need for quality-ranking. Term-frequency search alone fails for the Web, because the Web doesn't prefilter for quality.
  • Trust (how safe the information is to use). The more function-critical the information is, the greater the need for trust-ranking. If a DHT's host-lookup can be manipulated to flood an unsuspecting computer (a DDoS) then the DHT is unsound.
@vsbuffalo
vsbuffalo / Makefile
Last active Nov 28, 2018
finally, a LaTeX makefile that captures your anger and frustration
View Makefile
# Thanks https://github.com/EBI-predocs/latex-thesis/blob/master/Makefile for
# some tips
LATEXMK = latexmk -xelatex
# CONFIG
target = manuscript
references = bib.bib
# SETUP
includes := $(shell ls *.tex) ${references}
@bishboria
bishboria / springer-free-maths-books.md
Last active Aug 27, 2021
Springer made a bunch of books available for free, these were the direct links