Skip to content

Instantly share code, notes, and snippets.

View tiffehr's full-sized avatar
🤙
Reach out if you want to work together!

Tiff Fehr tiffehr

🤙
Reach out if you want to work together!
View GitHub Profile
@vaguity
vaguity / Hacks-Hackers NYC: Encryption and Operational Security for Journalists (2013-09-16).md
Last active April 29, 2016 17:34
Notes from Hacks/Hackers NYC workshop on encryption and opsec for journalists. Notes come from talk by Jennifer Valentino.

Hacks/Hackers NYC: Encryption and Operational Security for Journalists (2013-09-16)

Jennifer Valentino, Wall Street Journal (@jenvalentino)

These notes come straight from Jennifer's presentation; slides at https://docs.google.com/file/d/0B2HGtAJEbG8PdzVPdHcwekI2V2M/edit

Background

  • NSA covers 75% of internet traffic; not all is collected or sifted
  • Big issues with suveillance are not the NSA but leak investigations, subpoenas, accidental disclosure and chilling effects on sources

Open the branch you're working on in a browser (e.g. for follow-up pull requests, etc.). Got this one from Tom C. during a pairing session. It is awesome.

function open_branch { open http://[github url]/username/`basename \`pwd\``/tree/
$(git symbolic-ref head| sed -e 's/.*\///g'); }

(This lives in my ~/.bash_profile)

@hubgit
hubgit / README.md
Last active July 15, 2026 15:56
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

@meyerweb
meyerweb / US Custom.keylayout.xml
Last active December 11, 2015 02:28
An OS X US keyboard layout file with some customizations (created using Ukelele running on Snow Leopard, if that matters).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Last edited by Ukelele version 2.1.10 on 2012-07-12 at 12:43 (EDT)-->
<!--
An OS X US keyboard layout file with the following customizations:
* Option-. ONE DOT LEADER ( ․ )
* Option-h UPWARDS WHITE ARROW ( ⇧ )
* Option-j UP ARROWHEAD ( ⌃ )
* Option-k OPTION KEY ( ⌥ )
anonymous
anonymous / gmom-validator-pattern
Created January 3, 2013 18:52
Patterns for Tiff
describe('Tiff problem', function() {
it('goes a little something like this', function() {
var NS = {};
var Bing = function(myFoo) {
this.foo = myFoo;
};
Bing.prototype = {
getFoo: function() {
@jeremyjbowers
jeremyjbowers / red_velvet_cake.md
Last active March 30, 2022 17:33
Georgia Red Velvet Cake

Red Velvet Cake

Red Velvet cake recipe Red Velvet cake finished

Cake

Ingredients

From original recipe

@esmooov
esmooov / ctrr.md
Created May 25, 2012 16:50
Carats and Tildes, Resets and Reverts

Until last night I lived in fear of tildes, carats, resets and reverts in Git. I cargo culted, I destroyed, I laid waste the tidy indicies, branches and trees Git so diligently tried to maintain. Then Zach Holman gave a talk at Paperless Post. It was about Git secrets. He didn't directly cover these topics but he gave an example that made me realize it was time to learn.

A better undo

Generally, when I push out bad code, I panic, hit git reset --hard HEAD^, push and clean up the pieces later. I don't even really know what most of that means. Notational Velocity seems to be fond of it ... in that I just keep copying it from Notational Velocity and pasting it. Turns out, this is dumb. I've irreversibly lost the faulty changes I made. I'll probably even make the same mistakes again. It's like torching your house to get rid of some mice.

Enter Holman. He suggests a better default undo. git reset --soft HEAD^. Says it stag

@maxfenton
maxfenton / sass compass sprites
Created April 18, 2012 00:19
.@canarymason's SASS/COMPASS sprites presentation snippet
@import "badges/*.png";
$badges-sprite-dimensions: true;
// @include all-badges-sprites
$badges: clean-start code--viewer color drupal-ui-patterns; // and the rest of the relevant list items
.badges {
@include horizontal-list;
@nzakas
nzakas / namespace.js
Created December 6, 2011 19:14
A single global with a namespace method
//BSD Licensed
var YourGlobal = {
namespace: function(ns){
var parts = ns.split("."),
object = this,
i, len;
for (i=0, len=parts.length; i < len; i++) {
if (!object[parts[i]]) {
@bergantine
bergantine / gist:989602
Last active September 25, 2015 21:47
SCSS Mixix Example. #sass #scss #demo
// example of string interpolation in a mixin
// matches a particular color and image together following a naming scheme for the images
$green: #7bd939;
$orange: #de712c;
@mixin sectionhead($color, $name) {
.section-head {
background-color: $color;
background-image: url('../../images/masthead-' + $name + '.jpg');