Skip to content

Instantly share code, notes, and snippets.

View dangpzanco's full-sized avatar

Daniel Zanco dangpzanco

View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@grindars
grindars / steam_bootstrap.sh
Created December 7, 2012 07:53
Steam installer for Debian
#!/bin/bash
#
# Steam installer for Debian wheezy (32- and 64-bit)
#
# Place into empty directory and run.
#
download() {
local url="$1"
local filename="$(basename "$url")"
<!DOCTYPE html>
<!-- saved from url=(0032)http://www.rodrigoghedin.com.br/ -->
<html lang="pt-BR"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>Rodrigo Ghedin</title>
<link href="http://www.rodrigoghedin.com.br/css" rel="stylesheet" type="text/css">
<link href="http://www.rodrigoghedin.com.br/favicon.png" rel="shortcut icon" type="image/x-icon">
<meta name="description" content="Página pessoal de Rodrigo Ghedin.">
<meta name="keywords" content="rodrigo ghedin, ghedin, gizmodo, gemind, rodrigo, meio bit, winajuda, paranavaí, direito, faculdades maringá, uem, comunicação, maringá">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ax3l
ax3l / CUDA_Compilers.md
Last active November 4, 2024 08:04
CUDA Compilers
@guiambros
guiambros / .XCompose
Last active September 26, 2022 18:15
.XCompose
#-#-#-#-#-#-#-#
# ~/.XCompose
# To change the US International keyboard layout to behave like the
# Microsoft Windows (TM) version of the layout
# version: 0.2 edit 6 (20110403-6)
# by @tamh [48bytes at gmail com]
#
# Released under LGPL v2.1. Please refer to it by going to:
# <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>
@smealum
smealum / bin2wav.py
Last active July 12, 2024 18:59
bangai-o soundhax
import sys
import wave
import struct
# bit0 is a single period sine wave at 1024Hz with a given amplitude
# bit1 is the same but with ~2.7 times the amplitude
bits = [[0x00, 0x09, 0x12, 0x1A, 0x21, 0x27, 0x2C, 0x2F, 0x30, 0x2F, 0x2C, 0x27, 0x21, 0x1A, 0x12, 0x09, 0x00, 0xF6, 0xED, 0xE5, 0xDE, 0xD8, 0xD3, 0xD0, 0xD0, 0xD0, 0xD3, 0xD8, 0xDE, 0xE5, 0xED, 0xF6], [0x00, 0x18, 0x30, 0x46, 0x59, 0x69, 0x75, 0x7C, 0x7F, 0x7C, 0x75, 0x69, 0x59, 0x46, 0x30, 0x18, 0x00, 0xE7, 0xCF, 0xB9, 0xA6, 0x96, 0x8A, 0x83, 0x81, 0x83, 0x8A, 0x96, 0xA6, 0xB9, 0xCF, 0xE7]]
bits[0] = [b^0x80 for b in bits[0]]
bits[1] = [b^0x80 for b in bits[1]]
bits[0] = struct.pack('%sB' % len(bits[0]), *bits[0])
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active November 8, 2024 20:14
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

@nikhan
nikhan / twitter.sh
Created January 1, 2016 04:45
twitter ffmpeg
ffmpeg -i test.mov -vcodec libx264 -vf 'scale=640:trunc(ow/a/2)*2' -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -strict experimental -r 30 out.mp4
@t-nissie
t-nissie / fib.jl
Last active May 31, 2021 22:14
Three ways of generating n-th Fibonacci number in Julia language
#!/usr/bin/env julia
# Gist: https://gist.github.com/t-nissie/641df996b9035f85b230
# Three ways of generating n-th Fibonacci number in Julia language
# Put perfutil.jl in the same directory as:
# wget https://raw.githubusercontent.com/JuliaLang/julia/master/test/perf/perfutil.jl
# Turn off garbage collection (GC), when you get occasional bad timings. See perfutil.patch below.
###
using Base.Test
include("perfutil.jl")
@graymouser
graymouser / hb_all_books_dl.js
Created February 28, 2016 14:09
Humble bundle book bundles - download all books at once
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
*/
$('a').each(function(i){
if ($.trim($(this).text()) == 'MOBI') {
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">');
document.getElementById('dl_iframe_'+i).src = $(this).data('web');
}
});