Skip to content

Instantly share code, notes, and snippets.

@tednaleid
tednaleid / gist:c4ed5ec8e047f1adb13c1dd333bbb2e2
Created March 24, 2017 05:29
shell commands for finding and deleting duplicate files based on md5sum of the file
# RUN AT YOUR OWN RISK, UNDERSTAND THE COMMANDS AND DO NOT RUN BLINDLY
This will find all the duplicate photos in a `raw_photos` directory.
create md5sum of all files (after `brew install coreutils`):
find raw_photos -type f -exec gmd5sum "{}" + > files.md5
then sort that and you can find the files where the md5sum (the first field) is repeated for spot-checking and comparison
@ColinHarrington
ColinHarrington / .gitconfig
Created January 18, 2012 17:37
git aliases
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
lg = log -p
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
@aaronhanson
aaronhanson / SftpServer.groovy
Created December 31, 2014 15:56
Simple Groovy Sftp Server
@Grab(group='org.apache.sshd', module='sshd-core', version='0.13.0')
import org.apache.sshd.SshServer
import org.apache.sshd.server.PasswordAuthenticator
import org.apache.sshd.server.command.ScpCommandFactory
import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider
import org.apache.sshd.server.session.ServerSession
import org.apache.sshd.server.sftp.SftpSubsystem
import org.apache.sshd.server.shell.ProcessShellFactory
@timyates
timyates / ReactiveRPS.groovy
Last active December 30, 2015 11:39
Reactive Rock Paper Scissors with Groovy and RxJava
@Grab( 'com.netflix.rxjava:rxjava-groovy:0.15.1' )
import groovy.transform.*
import rx.*
@CompileStatic
class RPSRX {
enum Result {
WIN, LOSE, DRAW
}
@timyates
timyates / .bash_profile.sh
Last active December 22, 2015 10:49
Two bash functions to switch JVM on OS X (with GVM installed as well)
export JAVA7_HOME=`/usr/libexec/java_home -v 1.7*`
export JAVA8_HOME=`/usr/libexec/java_home -v 1.8*`
function jdk7 {
export JAVA_HOME=$JAVA7_HOME
set_path
echo "Using Java 7 $JAVA_HOME"
}
function jdk8 {
@hlship
hlship / coffeescript.gradle
Created June 29, 2012 16:41
CompileCoffeeScript task for Gradle
import ro.isdc.wro.model.resource.*
import ro.isdc.wro.extensions.processor.js.*
buildscript {
repositories { mavenCentral() }
dependencies {
classpath "ro.isdc.wro4j:wro4j-extensions:${versions.wro4j}"
}
}
"Ann Lenczewski (DFL)" <rep.ann.lenczewski@house.mn>
"Diane Loeffler (DFL)" <rep.diane.loeffler@house.mn>
"Greg Davids (R)" <rep.greg.davids@house.mn>
"Sarah Anderson (R)" <rep.sarah.anderson@house.mn>
"Tom Anzelc (DFL)" <rep.tom.anzelc@house.mn>
"Bob Barrett (R)" <rep.bob.barrett@house.mn>
"John Benson (DFL)" <rep.john.benson@house.mn>
"Lyndon Carlson Sr. (DFL)" <rep.lyndon.carlson@house.mn>
"Jim Davnie (DFL)" <rep.jim.davnie@house.mn>
"Steve Drazkowski (R)" <rep.steve.drazkowski@house.mn>
@easierbycode
easierbycode / manualcall.js
Created December 22, 2011 17:38 — forked from mxriverlynn/manualcall.js
search with backbone collections
var results = new SearchResults();
results.searchTerm = "some search term";
results.fetch({
success: someView.showTheResults
});
@mxriverlynn
mxriverlynn / manualcall.js
Created December 15, 2011 14:14
search with backbone collections
var results = new SearchResults();
results.searchTerm = "some search term";
results.fetch({
success: someView.showTheResults
});
@toddb
toddb / gist:1474205
Created December 13, 2011 22:27 — forked from mathieul/gist:966776
Require files using RequireJS before running Jasmine specs
/**
* @license Copyright (c) 2012, toddb GoneOpen Limited.
* Available via the MIT or new BSD license.
* based on https://gist.github.com/966776 (mathieul) and forked to https://gist.github.com/1474205
* jasmine.requirejs() returns a function that will load the file(s) required
* and will wait until it's done before proceeding with running specs.
* The function returned is intended to be passed to beforeEach() so the file(s)
* is(are) loaded before running each spec.
*