git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| ''' | |
| given a Model with: | |
| category = models.CharField(max_length=32, choices=CATEGORY_CHOICES) | |
| pubdate = models.DateTimeField(default=datetime.now) | |
| <other fields> | |
| Fetch the item from each category with the latest pubdate. | |
| ''' |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "time" | |
| ) | |
| var urls = []string{ | |
| "https://splice.com/", |
| #!/bin/bash | |
| #shows traffic on the specified device | |
| function human_readable { | |
| VALUE=$1 | |
| BIGGIFIERS=( B K M G ) | |
| CURRENT_BIGGIFIER=0 | |
| while [ $VALUE -gt 10000 ] ;do | |
| VALUE=$(($VALUE/1000)) |
People
:bowtie: |
π :smile: |
π :laughing: |
|---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |
| #!/bin/bash | |
| function workspace_cd() { | |
| cd $@ && [ -f ".workspace" ] && source .workspace | |
| } | |
| alias cd="workspace_cd" |
| [alias] | |
| recent = "!git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)' | head -n 10" | |
| co = checkout | |
| cob = checkout -b | |
| coo = !git fetch && git checkout | |
| br = branch | |
| brd = branch -d | |
| brD = branch -D | |
| merged = branch --merged | |
| st = status |
I've put together these notes as I read about DHT's in depth and then learned how the libtorrent implementation based on the Kademlia paper actually works.
400,000,000,000 (400 billion stars), that's a 4 followed by 11 zeros.
The number of atoms in the universe is estimated to be around 10^82.
A DHT with keys of 160 bits, can have 2^160 possible numbers, which is around 10^48
| #!/usr/bin/python | |
| import os | |
| import errno | |
| import sqlite3 | |
| import sys | |
| from time import time | |
| from cPickle import loads, dumps | |
| import logging |
| Summary | How to control (or Understand) your GIST page's files list order. |
| Notice | not official documentation. |