Skip to content

Instantly share code, notes, and snippets.

Avatar
💬
is typing

David Huerta huertanix

💬
is typing
View GitHub Profile
@alyssarosenzweig
alyssarosenzweig / demo.m
Created September 25, 2021 02:09
AppleJPEGDriver decode routine for the Apple M1
View demo.m
/*
* Copyright (C) 2021 Alyssa Rosenzweig <alyssa@rosenzweig.io>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
@mtigas
mtigas / onion-svc-v3-client-auth.sh
Last active March 14, 2023 17:43
experiments with using v3 onions with client auth (as of tor 0.3.5.X)
View onion-svc-v3-client-auth.sh
#!/bin/bash
# needs openssl 1.1+
# needs `basez` https://manpages.debian.org/testing/basez/base32hex.1.en.html
# (but something else that decodes the base64 and re-encodes the raw key bytes
# to base32 is probably fine too)
##### generate a key
openssl genpkey -algorithm x25519 -out /tmp/k1.prv.pem
@agent86ix
agent86ix / custom_end.gcode
Last active January 25, 2023 00:58
Wanhao i3 Plus Gcode
View custom_end.gcode
; Reference - https://www.mpselectmini.com/starting_ending_g-code_scripts
M400 ; wait for pending commands to finish
M104 S0 ; turn off hotend/extruder heater
M140 S0 ; turn off bed heater
G91 ; set to relative positioning
G1 E-2 F300 ; retract the filament a bit before lifting the nozzle to release some of the pressure
G1 Z1 ; raise Z 1mm from current position
G1 E-2 F300 ; retract filament even more
G90 ; set to absolute positioning
G1 X20 ; move X axis close to tower but hopefully far enough to keep the fan from rattling
@joshgerdes
joshgerdes / Wanhao_Cura_Profile16.ini
Last active March 31, 2022 17:01
Monoprice Maker Select Plus (Wanhao i3 Plus) Setup
View Wanhao_Cura_Profile16.ini
[profile]
layer_height = 0.16
wall_thickness = 1.2
retraction_enable = True
solid_layer_thickness = 1.2
fill_density = 10
nozzle_size = 0.4
print_speed = 50
print_temperature = 200
print_temperature2 = 0
@melaniehoff
melaniehoff / random_folder.py
Last active June 9, 2019 00:09
A *truly* Random Folder
View random_folder.py
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
View source protection basics.md

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

View gist:1e48fa08701f3e258e6c31910f6f73b3
Email: olivia@freedom.press
Twitter: @_olivemartini_
PGP fingerprint: 9375 170D 998A 6FC4 D077 3AE7 C154 0715 5781 E178
Keybase: olivemartini
@andrewlkho
andrewlkho / README.md
Created April 6, 2016 21:36
How to run sshd as a Tor hidden service on a Raspberry Pi
View README.md

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:

@darkyen
darkyen / gist:120c46739985ebf3b39b
Created June 10, 2015 03:40
Ferengi Rules of Acquisition [Complete List*]
View gist:120c46739985ebf3b39b
1 "Once you have their money, you never give it back." "The Nagus" (DS9 episode)
2 "The best deal is the one that makes the most profit." The 34th Rule (DS9 novel)
3 "Never spend more for an acquisition than you have to." "The Maquis, Part II" (DS9 episode)
4 "A woman wearing clothes is like a man in the kitchen." The Ferengi Rules of Acquisition (DS9 novel)
5 "Always exaggerate your estimates." Cold Fusion (SCE novel)
6 "Never let family stand in the way of opportunity." "The Nagus" (DS9 episode)
7 "Always keep your ears open." "In the Hands of the Prophets" (DS9 episode)
8 "Small print leads to large risk." The Ferengi Rules of Acquisition (DS9 novel)
9 "Instinct, plus opportunity, equals profit." "The Storyteller" (DS9 episode)
10 "Greed is eternal." "Prophet Motive" (VOY episode)
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 14, 2023 15:53
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