Skip to content

Instantly share code, notes, and snippets.

@aras-p
aras-p / preprocessor_fun.h
Last active April 29, 2025 01:49
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@sergejmueller
sergejmueller / ttf2woff2.md
Last active March 9, 2024 13:37
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2
@grugq
grugq / gist:03167bed45e774551155
Last active April 15, 2025 11:22
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@ttaubert
ttaubert / onion-gen.js
Created November 2, 2014 13:14
Generating custom .onion names with the WebCrypto API
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/*
* thirty-two
* https://github.com/chrisumbel/thirty-two
*

N404KR

Registration

OBR LEASING
PO BOX 725
BRISTOW, VA

@nathanhornby
nathanhornby / Preferences.sublime-settings.JSON
Last active August 30, 2018 16:08
My Sublime Text 3 user preferences
{
"bold_folder_labels": true,
"caret_style": "wide",
"color_scheme": "Packages/Alchemist/Alchemist.tmTheme",
"draw_white_space": "selection",
"enable_tab_scrolling": false,
"ensure_newline_at_eof_on_save": true,
"font_face": "DejaVu Sans Mono",
"font_size": 12.5,
"highlight_line": true,
@cmahns
cmahns / otrdm.md
Last active September 24, 2024 14:40
HOWTO: Twitter DM with OTR

Twitter DM + OTR: A quick and dirty tutorial

With the recent removal of the 140-character limit in Direct Messages by Twitter, DM's have now become a much more useful platform for communicating between individuals and groups. Sadly, DM's are still sent in plaintext between users and Twitter has no plans currently on encrypting these messages, at least as of August 2015. Since these are stored in plaintext at rest, an adversary can see the content of the message you are sending, which the two parties might not wish to happen. Fortunately as a few applications with basic Twitter support which also have excellent support for OTR, all hope isn't lo

@cachrisman
cachrisman / diskutil_encrypt_etd.sh
Last active May 18, 2024 22:20
bash script to show speed, data remaining and estimated time to completion of Apple OS X FileVault 2 encryption/decryption process
#!/bin/bash
interval=5 # Sampling time in seconds
volumename="/Volumes/My Passport for Mac/"
total_size=$(diskutil cs info "$volumename" | grep -E "LV Size" | awk '{print $3}')
while [ true ]; do
first_size=$(diskutil cs info "$volumename" | grep -E "LV Bytes Converted" | awk '{print $4}')
sleep $interval

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.