Skip to content

Instantly share code, notes, and snippets.

View payingattention's full-sized avatar
🏠
(Waiting patiently for4ticket # https://github.com/keybase/client/issues/14640.)

// /∫ ∫∫ ∫prosodyVvVereableContext( (( [[ [( ( payingattention

🏠
(Waiting patiently for4ticket # https://github.com/keybase/client/issues/14640.)
View GitHub Profile
@0xabad1dea
0xabad1dea / rsa-not-buying-it.md
Last active May 4, 2022 21:59
Sorry, RSA, I'm just not buying it

Sorry, RSA, I'm just not buying it

I want to be extremely clear about three things. First, this is my personal opinion – insert full standard disclaimer. Second, this is not a condemnation of everyone at RSA, present and past. I assume most of them are pretty okay, and that the problem is confined to a few specific points in the company. However, “unknown problem people making major decisions at RSA” is a bit unwieldy, so I will just say RSA. Third, I'm not calling for a total boycott on RSA. I work almost literally across the street from them and I don’t want to get beat up by roving gangs of cryptographers at the local Chipotle.

RSA's denial published last night is utter codswallop that denies pretty much everything in the world except the actual allegations put forth by Reuters and hinted at for months by [other sources](http://li

Thinking about 'meta' torrent file format.

Let's say I've downloaded big file using torrent. Then add very small file and recreate new torrent file. Like subtitle.

Now two torrent files are totally different file to machine. Tracker and torrent client would treat them different torrent. Of course we don't need duplicate original data file for multi seeding. But seeders and leechers split by two torrent file. They don't know about they have exact same file. Torrent client and tracker cannot connect people for exact same data. We have split share pool for exact same file. It's not efficient. More seeders, more speed.

Let's say original torrent file is 1.torrent.

[ file1 ]
@kentbrew
kentbrew / RedditTipButton.md
Last active December 29, 2015 21:09
Invite your readers to leave you a Bitcoin tip on Reddit

###Invite your readers to leave you a Bitcoin tip on Reddit

Reddit's Bitcoin implementation is ideal for beginners. Here's how to get them to give it a try.

####Structure

@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@Asparagirl
Asparagirl / gist:6202872
Last active March 28, 2022 20:28
Want to help Archive Team do a "panic grab" of a website, so that you can later upload it to the Internet Archive for inclusion in its WayBack Machine? Here's the code!

Want to grab a copy of your favorite website, using wget in the command line, and saving it in WARC format? Then this is the gist for you. Read on!

First, copy the following lines into a textfile, and edit them as needed. Then paste them into your command line and hit enter:

export USER_AGENT="Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27"
export DOMAIN_NAME_TO_SAVE="www.example.com"
export SPECIFIC_HOSTNAMES_TO_INCLUDE="example1.com,example2.com,images.example2.com"
export FILES_AND_PATHS_TO_EXCLUDE="/path/to/ignore"
export WARC_NAME="example.com-20130810-panicgrab"
@willurd
willurd / web-servers.md
Last active April 25, 2024 09:21
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
<?php
/*
Plugin Name: Shoestrap Custom Templates
Plugin URI: http://shoestrap.org
Description: This plugin replaces the default templates with our custom ones using the hooks provided by the <a href="http://shoestrap.org/downloads/shoestrap">Shoestrap</a> theme
Version: 1.00
Author: Aristeides Stathopoulos
Author URI: http://aristeides.com
*/
@gr2m
gr2m / control_devices.dreamcode.js
Last active August 29, 2016 09:01
Imagine you could control other devices with a simple JavaScript API, right from your browser.
// Ask the coffee machine at IP 192.168.2.2 to do its job
device('192.168.2.2')
.do( 'coffee' )
.then( wakeMeUpCallback )
// turn all lights on
device.findAll('light').do('turnOn')
@gr2m
gr2m / convert_dreamcode.js
Last active August 29, 2016 09:01
Imagine you could convert all kind of things to all kind of different things, e.g. taking a screenshot of a dom element or converting another website to a screenshot. Forks & comments much appreciated! #nobackend #dreamcode
// convert a dom element to a PDF and download it
convert( $('.invoice') ).to( 'invoice.pdf' ).download()
// alternatively
download( convert( $('.invoice') ).to( 'invoice.pdf' ) )
// convert another website to a png and show it on the page
convert( 'http://exam.pl/page' ).toImage().then( $('.screenshots').append )
// attach a file to an email
@gr2m
gr2m / email_dreamcode.js
Last active January 28, 2021 15:10
Imagine you could send emails with JavaScript, multipart, and with attachments?! How would the code look like? This is what I came up with. Forks & comments much appreciated! #nobackend #dreamcode
// send text email
sendEmail({
subject: "Hello, World!",
text: "This mail has been sent from the frontend",
to: "joe@exam.pl"
})
// send multipart text / html email
sendEmail({
subject: "Hello, World!",