Skip to content

Instantly share code, notes, and snippets.

View huertanix's full-sized avatar
💬
is typing

David Huerta huertanix

💬
is typing
View GitHub Profile
@jordelver
jordelver / gist:3139365
Created July 18, 2012 22:29
How to write an image file to an SD card under Mac OS X (for Raspberry Pi)

Find the SD card device

In this case, the SD card is /dev/disk4. DO NOT get this wrong or you may destroy all the data on the wrong disk/card/drive.

diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *160.0 GB   disk0

1: EFI 209.7 MB disk0s1

@andrewlkho
andrewlkho / README.md
Created April 6, 2016 21:36
How to run sshd as a Tor hidden service on a Raspberry Pi

I keep a Raspberry Pi at a relative's house which backs up my cloud storage to a Time Machine on their network. Previously I had port 22 NAT'd to the Raspberry Pi so that I could ssh in for occasional admin. However, I found that even with iptables/fail2ban installed, there were daily attempts at getting hacked. As I only infrequently need to access the server, I decided to set up sshd as a Tor hidden service which did not require port 22 to be exposed to the wider internet.

Setup sshd as a hidden service

The first step is to install tor:

# apt-get install tor

Add the following lines to /etc/tor/torrc:

@cheeaun
cheeaun / putonglasses.txt
Created September 14, 2012 08:57
put on glasses unicode
•_•)
( •_•)>⌐■-■
(⌐■_■)
@melaniehoff
melaniehoff / random_folder.py
Last active June 9, 2019 00:09
A *truly* Random Folder
import glob
import random
import shutil
import os
import pickle
## Make an empty folder called Random and put it on your desktop
## Make an empty file called all_my_files.txt and put it in the same dir as random_folder.py
## Replace my file paths with yours
@codingjester
codingjester / three_legged_oauth.py
Last active December 9, 2018 02:34
Tumblr 3 Legged OAuth using Python lib OAuth2
import urlparse
import oauth2 as oauth
consumer_key = 'consumer_key'
consumer_secret = 'consumer_secret'
request_token_url = 'https://www.tumblr.com/oauth/request_token'
access_token_url = 'https://www.tumblr.com/oauth/access_token'
authorize_url = 'https://www.tumblr.com/oauth/authorize'
Email: olivia@freedom.press
Twitter: @_olivemartini_
PGP fingerprint: 9375 170D 998A 6FC4 D077 3AE7 C154 0715 5781 E178
Keybase: olivemartini
@brendandawes
brendandawes / Toy Rocket Construction Kit.scad
Last active April 11, 2018 02:40
OpenSCAD file for the Toy Rocket Construction Kit
/*
Toy Rocket Construction Kit by Brendan Dawes
brendandawes.com
Nose cone isn't great but it suffices for now!
*/
rocketRadius = 20;
connectorHeight = 5;

Source Protection in 2017: A Starter Guide

Like sex, there's no such thing as safe leaking. But there is safer leaking, and ways to encourage your sources to be safer.

The next few months (like the last few weeks) will see a lot of people who want to talk about their life and their work with a media audience; people who never wanted to talk before. If they come to us, and by us I mean journalists, we need to be ready and equipped to protect them, whether what they tell us becomes journalism or not. We also need time. We need to be in a position to check stories, cross check references, and talk to experts to make sure the leaks we receive are true and right and placed in the appropriate context. We get all this from protecting our sources from discovery by governments, corporations, or individuals.

First off, initial contact is the hardest step to keep secure and private. But it is doable. Journalists, you should use social media profiles, bylines, and web pages protected by https to tell potenti

@epixoip
epixoip / TitanX.md
Last active December 23, 2016 10:56
World's First Nvidia GTX Titan X cudaHashcat Benchmarks

Nvidia GTX Titan X cudaHashcat Benchmarks

Product: Sagitta Inceptus (PN S1430X-GTX-TITANX) (my dev box)

Software: cudaHashcat 1.36b31, ForceWare 346.35

Accelerator: 1x Nvidia GTX Titan X reference design

Observations

@mdobson
mdobson / CSVtoJSON.rb
Created July 8, 2012 15:51
Convert CSV to JSON with simple command line script
#!/usr/bin/env ruby
require 'json'
file = File.new(ARGV[0], "r")
#get format
puts "Getting format"
format = file.gets