Skip to content

Instantly share code, notes, and snippets.

@dvdbng
dvdbng / vim-heroku.sh
Last active April 22, 2024 22:42
Run vim in heroku updated 2017
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
cd -
@Firefishy
Firefishy / sysctl-tune.conf
Created March 23, 2017 17:57
Safe sysctl tuning for modern high traffic systems
# Enable Packetization Layer Path MTU Discovery.
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_base_mss = 1024
# Ensure slow start is disabled
# https://github.com/ton31337/tools/wiki/tcp_slow_start_after_idle---tcp_no_metrics_save-performance
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_no_metrics_save = 0
# Tune network buffers - servers have more than 16MB of RAM in 2017
@PatWie
PatWie / update-tensorflow.sh
Last active December 4, 2019 18:24
simple cronjob script to frequently build TensorFlow from source automatically
#!/bin/bash
# Patrick Wieschollek
# =============================================================
# UPDATE SOURCE
# =============================================================
git checkout -- .
git pull origin master
@Prajjwal
Prajjwal / ephemeral-file-sharing-services.md
Last active November 22, 2023 17:36
A List of Ephemeral File Sharing Services

A List of Ephemeral File Sharing Services

Contributions welcome.

~ Prajjwal Singh

Service CLI? Max Size Direct Access Files Expire? Can Limit Download Count? Password Protection HTTPS
c-v.sh curl -F 4 GB Yes Yes, by Mister Alg. No No Enforced
FileIO Yes 5 GB Yes Optionally Fixed @ 1 No Yes
@justjanne
justjanne / Price Breakdown.md
Last active April 11, 2024 22:21 — forked from kylemanna/price.txt
Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Permalink: git.io/vps

$5/mo

Provider Type RAM Cores Storage Transfer Network Price

Installing Electrum on an air-gapped Ubuntu Machine

This guide shows how to install Electrum on an air-gapped machine. You will also need an Ubuntu machine connected to the network in order to complete this guide (it can be a virtual machine).

On the online machine

If you are running Ubuntu 16.04 off of a live USB, there is a bug that affects the package manager. You need to run these two commands at the terminal to fix it:

$ sudo mv /var/cache/app-info/xapian/default /var/cache/app-info/xapian/default_old

@mariodian
mariodian / bitcoind.service
Created July 6, 2016 06:17
Bitcoind Systemd script
[Unit]
Description=Bitcoin's distributed currency daemon
After=network.target
[Service]
User=pi
Group=pi
Type=forking
PIDFile=/var/lib/bitcoind/bitcoind.pid
<tr><td><a name="000">000</a></td><td>EmptyKey</td><td><a href="http://www.fishofprey.com/2011/06/salesforce-empty-key-id.html">Ref</a></td></tr>
<tr><td><a name="001">001</a></td><td>Account</td><td></td></tr>
<tr><td><a name="002">002</a></td><td>Note</td><td><a href="http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_note.htm">Doc</a></td></tr>
<tr><td><a name="003">003</a></td><td>Contact</td><td></td></tr>
<tr><td><a name="005">005</a></td><td>User</td><td></td></tr>
<tr><td><a name="006">006</a></td><td>Opportunity</td><td></td></tr>
<tr><td><a name="007">007</a></td><td>Activity</td><td></td></tr>
<tr><td><a name="008">008</a></td><td>OpportunityHistory</td><td></td></tr>
<tr><td><a name="00A">00A</a></td><td>FORECAST_ITEM</td><td></td></tr>
<tr><td><a name="00B">00B</a></td><td>ListView</td><td></td></tr>
@yetithefoot
yetithefoot / stuns
Last active April 2, 2024 10:49 — forked from zziuni/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@jboner
jboner / latency.txt
Last active May 18, 2024 15:58
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD