Skip to content

Instantly share code, notes, and snippets.

@kennwhite
kennwhite / vpn_psk_bingo.md
Last active April 5, 2025 04:55
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@genadyo
genadyo / gist:295a5e8f0d743f57137f
Created November 27, 2014 17:21
app_store_app_data.json
{
"491289025" : "ijinshan-kappmarket://",
"301521403" : "fb103361823069955://",
"492178411" : "ils492178411://",
"346142396" : "fb234434003713://",
"310633997" : "whatsapp://",
"370614765" : "com.condenet.newyorker://",
"325058491" : "rnmddisco://",
"382952264" : "epichttp://",
"477048487" : "predictwind://",
@ptaoussanis
ptaoussanis / transducers.clj
Last active December 8, 2024 03:24
Quick recap/commentary: Clojure transducers
(comment ; Fun with transducers, v2
;; Still haven't found a brief + approachable overview of Clojure 1.7's new
;; transducers in the particular way I would have preferred myself - so here goes:
;;;; Definitions
;; Looking at the `reduce` docstring, we can define a 'reducing-fn' as:
(fn reducing-fn ([]) ([accumulation next-input])) -> new-accumulation
;; (The `[]` arity is actually optional; it's only used when calling
;; `reduce` w/o an init-accumulator).
@kachayev
kachayev / concurrency-in-go.md
Last active January 6, 2025 22:43
Channels Are Not Enough or Why Pipelining Is Not That Easy
@syhw
syhw / dnn.py
Last active October 19, 2024 08:20
A simple deep neural network with or w/o dropout in one file.
"""
A deep neural network with or w/o dropout in one file.
License: Do What The Fuck You Want to Public License http://www.wtfpl.net/
"""
import numpy, theano, sys, math
from theano import tensor as T
from theano import shared
from theano.tensor.shared_randomstreams import RandomStreams
@john2x
john2x / 00_destructuring.md
Last active April 10, 2025 15:15
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

@vrilleup
vrilleup / spark-svd.scala
Last active July 22, 2024 11:10
Spark/mllib SVD example
import org.apache.spark.mllib.linalg.distributed.RowMatrix
import org.apache.spark.mllib.linalg._
import org.apache.spark.{SparkConf, SparkContext}
// To use the latest sparse SVD implementation, please build your spark-assembly after this
// change: https://github.com/apache/spark/pull/1378
// Input tsv with 3 fields: rowIndex(Long), columnIndex(Long), weight(Double), indices start with 0
// Assume the number of rows is larger than the number of columns, and the number of columns is
// smaller than Int.MaxValue
@staltz
staltz / introrx.md
Last active April 21, 2025 04:15
The introduction to Reactive Programming you've been missing
@ryanleary
ryanleary / ConditionalWriterExample.java
Last active August 29, 2015 14:01
A brief example of how Conditional Mutations work in Accumulo 1.6.0.
public void conditionalWrite(String docId, ColumnVisibility cv, Connector conn) throws Exception {
// setup writer
String tablename = "table";
ConditionalWriterConfig cwConfig = new ConditionalWriterConfig();
cwConfig.setAuthorizations(new Authorizations("a","b","c"));
ConditionalWriter cw = conn.createConditionalWriter(tablename, cwConfig);
// set up condition on this mutation
IteratorSetting is = new IteratorSetting(1, SuppressCVIterator.class);
@Sawboo
Sawboo / ffmpeg-twitch.md
Last active January 4, 2019 17:23
crazy twitch notes ugh

Pull the last 2 highlights from a users channel:

https://api.twitch.tv/kraken/channels/ennopp112/videos?limit=2

Get a single video:

https://api.twitch.tv/kraken/videos/c3473004

Scrape request to get .flv links: