Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Zanco dangpzanco

  • Florianópolis, Brasil
View GitHub Profile
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@grindars
grindars / steam_bootstrap.sh
Created Dec 7, 2012
Steam installer for Debian
View steam_bootstrap.sh
#!/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")"
View Rodrigo Ghedin.html
<!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">
View CUDA_Compilers.md
@smealum
smealum / bin2wav.py
Last active May 25, 2020
bangai-o soundhax
View bin2wav.py
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 Nov 11, 2021
Most VPN Services are Terrible
View vpn_psk_bingo.md

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

View twitter.sh
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
Three ways of generating n-th Fibonacci number in Julia language
View fib.jl
#!/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 Feb 28, 2016
Humble bundle book bundles - download all books at once
View hb_all_books_dl.js
/*
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');
}
});
@mcnees
mcnees / graph paper.tex
Last active Jul 20, 2021
Make your own quadrille, graph, hex, etc paper! Uses the pgf/TikZ package for LaTeX, which should be part of any modern TeX installation.
View graph paper.tex
%%-----------------------------------------------------------------------
%% Make your own quadrille, graph, hex, etc paper!
%% Uses the pgf/TikZ package for LaTeX, which should be part of
%% any modern TeX installation.
%% Email: mcnees@gmail.com
%% Twitter: @mcnees
%%-----------------------------------------------------------------------
\documentclass[11pt]{article}