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
@mtigas
mtigas / onion-svc-v3-client-auth.sh
Last active April 22, 2024 07:31
experiments with using v3 onions with client auth (as of tor 0.3.5.X)
#!/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
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 24, 2024 12:19
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

@brandonkelly
brandonkelly / templating.md
Last active February 7, 2024 15:20
Templating in EE vs. Craft

Would it be possible to include an iCal file attachment to the Access-A-Ride advance notification emails with a 30 minute window from the specified pickup time (that is the window in which Access-A-Ride drivers need to arrive)?

For example: if my Access-A-Ride is supposed to pick me up at 10:34 am from 1000 Broadway Ave and then again at 8:00 pm from 900 Jay St., include a calendar event (a .ics file) that would look similar to the following, attached to the advance trip notification:

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
SUMMARY:Access-A-Ride Pickup
@darkyen
darkyen / gist:120c46739985ebf3b39b
Created June 10, 2015 03:40
Ferengi Rules of Acquisition [Complete List*]
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)
@agent86ix
agent86ix / custom_end.gcode
Last active August 6, 2023 13:52
Wanhao i3 Plus 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
@alyssarosenzweig
alyssarosenzweig / demo.m
Created September 25, 2021 02:09
AppleJPEGDriver decode routine for the Apple M1
/*
* 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:
*
@bbrewer97202
bbrewer97202 / heroku-htaccess.md
Created August 10, 2012 18:20
Simple htaccess authentication on Heroku with cedar/php

Create an .htaccess file in the webroot:

AuthUserFile /app/www/.htpasswd
AuthType Basic
AuthName "Restricted Access"
Require valid-user

Create a .htpasswd file:

htpasswd -c /app/www/.htpasswd [username]

@joshgerdes
joshgerdes / Wanhao_Cura_Profile16.ini
Last active March 31, 2022 17:01
Monoprice Maker Select Plus (Wanhao i3 Plus) Setup
[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
@matenia
matenia / post.rb
Created May 10, 2012 01:29
Use custom method for FriendlyId (Example)
class Post < ActiveRecord::Base
# for SO: http://stackoverflow.com/questions/10481389/friendly-id-with-two-parameters
# EXAMPLE ASSUMES YOU ARE USING FRIENDLYID 4.X
# AND THAT YOU HAVE A SLUG:STRING COLUMN ON THE MODEL
# ...
extend FriendlyId
friendly_id :generate_custom_slug, :use => :slugged
# ...