Skip to content

Instantly share code, notes, and snippets.

View aredridel's full-sized avatar
💭
See my social media for status.

Aria Stewart aredridel

💭
See my social media for status.
View GitHub Profile
@pozorvlak
pozorvlak / git-anonymize
Last active February 10, 2026 22:01
Anonymise Git history
#!/bin/sh
# Suppose you want to do blind reviewing of code (eg for job interview
# purposes). Unfortunately, the candidates' names and email addresses are
# stored on every commit! You probably want to assess each candidate's version
# control practices, so just `rm -rf .git` throws away too much information.
# Here's what you can do instead.
# Rewrite all commits to hide the author's name and email
for branch in `ls .git/refs/heads`; do
// === Identifier rewriting for the ES6 module transpiler ===
// Proposal for minifier-friendly ES6 module transpiler output.
// This is for cases where we don't require any existing module
// format (AMD, CommonJS) and just want to emit a blackbox IIFE
// that uses modules internally. Those cases are Ember's normal
// global distribution (ember.min.js), as well as ES5 generated
// by the upcoming ember-cli ES6 stack.
// Do you all think this could work?
# https://www.mapbox.com/blog/processing-landsat-8/
task :landsat_2014 => :environment do
dirs = Dir["#{Rails.root.to_s}/db/initial/raster/*"].reject {|q| q =~ /tar\.gz/ }
dirs.each do |dir|
scene_id = dir.split("/")[-1]
[4,3,2].each do |band|
`gdalwarp -t_srs EPSG:3857 #{dir}/#{scene_id}_B#{band}.TIF #{dir}/#{scene_id}_B#{band}-projected.tif`
end
`convert -combine #{dir}/#{scene_id}_B{4,3,2}-projected.tif #{dir}/#{scene_id}_RGB-projected.tif && \
convert -channel B -gamma 0.925 -channel R -gamma 1.03 -channel RGB -sigmoidal-contrast 50x16% #{dir}/#{scene_id}_RGB-projected.tif #{dir}/#{scene_id}_RGB-projected-corrected.tif && \
@catamorphism
catamorphism / gist:db21762a1574c3d98103
Created November 7, 2014 23:10
What is gender? Trans-affirming, non-essentialist analyses
http://sugarandslugs.wordpress.com/2011/01/09/false-dichotomies/
http://takesupspace.wordpress.com/2010/02/05/combatting-combatting-ignorance-part-1-whose-ignorancewhos-ignorant/
http://takesupspace.wordpress.com/2010/02/06/combatting-combatting-ignorance-part-2-how-could-you-have-known-%E2%80%93you-already-did/
http://takesupspace.wordpress.com/2010/02/24/combatting-combatting-ignorance-part-3-of-4-cis-denial-self-knowledge-and-sexist-epistemology/
http://quinnae.com/2011/01/27/raiders-of-the-lost-etiology/
@latentflip
latentflip / gf.md
Last active April 14, 2021 03:29
vim, gf, and node

Vim, gf and node.

So, I just learned that gf exists. If your cursor is over a path in vim, and you type gf, it'll open that file/dir in a new buffer. You can also open in a new window/tab as detailed here.

In node, it'd be great if you could jump to a required file, huh? Trouble is, typically you don't put the .js on your require('./path/to/a/js/file'). No matter, vim has your back, just add set suffixesadd+=.js to your .vimrc and vim will try adding .js and see if it can find that file instead.

If you do a lot of spelunking in node_modules, it'd be great if you could jump to the directory of a required npm module too, right? A la, require('my-awesome-module'). Well, you can add set path+=$PWD/node_modules to your .vimrc too, and vim will add node_modules to the path, and jump to it's directory in node_modules (caveat: you must have opened vim from your project root for this too work).

For your cmd+c convenience:

#RIOT CODE GRRRL MANIFESTO #####(based on the original RIOT GRRRL MANIFESTO)

BECAUSE us girls crave apps and games and websites that speak to US that WE feel included in and can understand in our own ways.

BECAUSE we wanna make it easier for girls to see/hear each other's work so that we can share strategies and criticize-applaud each other.

BECAUSE we must take over the means of production in order to create our own revolution.

BECAUSE viewing our work as being connected to our girlfriends-politics-real lives is essential if we are gonna figure out how we are doing impacts, reflects, perpetuates, or DISRUPTS the status quo.

@tanb
tanb / xhyve-freebsd-tutorial-1.md
Last active November 27, 2021 13:07
FreeBSD running on xhyve tutorial. (Appendix: Resize image with qemu. Create FreeBSD VM with qemu).

TL;DR

  • Create 5GB FreeBSD image.
  • Install FreeBSD on xhyve.
  • Mount host directory.

Requisites

Object.keys(request) - ashley/ceej

BLUEBIRD_LONG_STACK_TRACES=1 - chris

(ooh, just remembered another tip: kill -s USR1 <node pid> will turn the debugger on any node process and you can point node-inspector at it) -chris

ooh another fun debugging tip: dbg = vm.runInDebugContext('Debug'); mirror = dbg.MakeMirror(objectValue); console.log(mirror.referencedBy()) - chris it lists all referencing objects to the object you pass to MakeMirror

turn on browser styles in computed properties in the browser - jeff

@cjwilburn
cjwilburn / am-chai.txt
Created January 16, 2017 20:16
almond milk chai
2-inch piece fresh ginger, cut into thin rounds, more if you like
2 cinnamon sticks, broken up
2 teaspoons black peppercorns (optional)
10 whole cloves
6 -10 cardamom pods (mix of green and black personally preferred, but if you only use one, go green)
1 clove star anise
2-3 tbsp black tea (darjeeling)
2 tsp simple syrup, agave nectar, honey, or your preferred sweetener
4 cups almond milk
dash smoked cinammon
@thebestsophist
thebestsophist / twitter-client-of-my-dreams.md
Last active April 26, 2018 15:34
The social media client I want

The social media client I want

Things I want from a social media client:

My own algorithms/filters

I want to filter content in not just out, I want to do it by:

  • …people I don’t want to miss and the conversations they’re having with others I follow but don’t need to always pay attention to.
  • …keywords, but also give something like word2vec a training dictionary of documents important to me (eg full text of my browsing history, zotero library, and ebook library), find words related to the words I want (eg, tell it I want “open government” and it’ll also find “open data”, “civic tech”, and “transparency”).
  • …event- and time-based topics