Skip to content

Instantly share code, notes, and snippets.

@jolros
jolros / grails-upgrade-2.0.3-2.0.4.diff
Created May 30, 2012 17:17
Diff between an upgraded Grails 2.0.3 -> 2.0.4 project and a new 2.0.4 project, or why detailed migration notes matter in code-copying web frameworks
diff -r 2.0.3/whoopy/application.properties 2.0.4/whoopy/application.properties
2,3c2,3
< #Tue May 29 20:23:57 PDT 2012
< app.grails.version=2.0.3
---
> #Tue May 29 20:24:18 PDT 2012
> app.grails.version=2.0.4
diff -r 2.0.3/whoopy/grails-app/conf/DataSource.groovy 2.0.4/whoopy/grails-app/conf/DataSource.groovy
17c17
< url = "jdbc:h2:mem:devDb;MVCC=TRUE"
@jolros
jolros / grails-upgrade-2.0.0-2.0.4.diff
Created May 30, 2012 17:21
Diff between an upgraded Grails 2.0.0 -> 2.0.4 project and a new 2.0.4 project, or why detailed migration notes matter in code-copying web frameworks
diff -r 2.0.0/whoopy/application.properties 2.0.4/whoopy/application.properties
2,3c2,3
< #Tue May 29 20:22:17 PDT 2012
< app.grails.version=2.0.0
---
> #Tue May 29 20:24:18 PDT 2012
> app.grails.version=2.0.4
diff -r 2.0.0/whoopy/grails-app/conf/BuildConfig.groovy 2.0.4/whoopy/grails-app/conf/BuildConfig.groovy
42c42,47
< runtime ":resources:1.1.5"
@jolros
jolros / grails-upgrade-2.0.0-2.3.1.diff
Created November 7, 2013 08:12
Diff between an upgraded Grails 2.0.0 -> 2.3.1 project and a new 2.3.1 project, or why detailed migration notes matter in code-copying web frameworks
diff -r 2.0.0/whoopy/.classpath 2.3.1/whoopy/.classpath
0a1
> <?xml version="1.0" encoding="UTF-8"?>
2,13c3,18
< <classpathentry kind="src" path="src/java"/>
< <classpathentry kind="src" path="src/groovy"/>
< <classpathentry kind="src" path="grails-app/conf"/>
< <classpathentry kind="src" path="grails-app/controllers"/>
< <classpathentry kind="src" path="grails-app/domain"/>
< <classpathentry kind="src" path="grails-app/services"/>
@jolros
jolros / grails-upgrade-2.3.0-2.3.1.diff
Created November 7, 2013 08:15
Diff between an upgraded Grails 2.3.0 -> 2.3.1 project and a new 2.3.4 project, or why detailed migration notes matter in code-copying web frameworks
diff -r 2.3.0/whoopy/application.properties 2.3.1/whoopy/application.properties
2,3c2,3
< #Wed Oct 23 10:21:58 PDT 2013
< app.grails.version=2.3.0
---
> #Wed Oct 23 10:22:32 PDT 2013
> app.grails.version=2.3.1
diff -r 2.3.0/whoopy/grails-app/conf/BuildConfig.groovy 2.3.1/whoopy/grails-app/conf/BuildConfig.groovy
59c59
< compile ":scaffolding:2.0.0"
@jolros
jolros / grails-2.0.0-2.3.1-stepupgrade.diff
Created November 7, 2013 08:31
Diff between two untouched Grails projects. One created under Grails 2.3.1, and one created under Grails 2.0.0 and upgraded sequentially through the following grails versions: 2.0.1 2.0.2 2.0.3 2.0.4 2.1.0 2.1.1 2.1.2 2.1.3 2.2.0 2.2.4 2.3.0 2.3.1 The project name is "whoopy" and the recursive diff is shown below. This is why detailed migration …
diff -r 2.0.0/whoopy/.classpath 2.3.1/whoopy/.classpath
0a1
> <?xml version="1.0" encoding="UTF-8"?>
2,13c3,18
< <classpathentry kind="src" path="src/java"/>
< <classpathentry kind="src" path="src/groovy"/>
< <classpathentry kind="src" path="grails-app/conf"/>
< <classpathentry kind="src" path="grails-app/controllers"/>
< <classpathentry kind="src" path="grails-app/domain"/>
< <classpathentry kind="src" path="grails-app/services"/>
@jolros
jolros / cs
Last active January 1, 2016 15:19
Shell script that adds keys to ssh-agent. Options to force a re-injection or set a custom lifetime for the keys. It will scan your .ssh directory for private keys or you can specify a key enumeration file. If your keys need passphrases you will add them during the scripts execution. See: http://blog.jolros.com/post/71467614049/revisiting-my-ssh-…
#!/usr/bin/env bash
read -d '' INSTRUCTIONS << EOF
Checks that the ssh-agent is running, and if not, kick it off
The script will find all private keys in your $HOME/.ssh directory.
You can also create a file called $HOME/.ssh/agentkeys containing
absolute paths or paths relative to the $HOME/.ssh directory of keys
you wish to add (variables will be expanded).
Options:
@jolros
jolros / spw
Created December 31, 2013 02:28
Shell script to open SigmaPlot 12 using wine by itself or with a file passed in as an argument. See: http://blog.jolros.com/post/71709752383/running-sigmaplot-as-a-mac-os-x-application-using-wine
#!/usr/bin/env bash
export WINEDEBUG=-all
WINE=/usr/local/bin/wine
SPW=$HOME/.wine/drive_c/Program\ Files/SigmaPlot/SPW12/Spw.exe
if [ -z "$1" ]; then
"$WINE" "$SPW" >& /dev/null &
else
@jolros
jolros / sigmaplotlauncher.scpt
Created December 31, 2013 03:08
AppleScript that can be used to launch SigmaPlot 12 using my spw script by itself or with a specified file(s) through the Finder. See: http://blog.jolros.com/post/71709752383/running-sigmaplot-as-a-mac-os-x-application-using-wine
on open theFiles
set arguments to ""
repeat with anItem in theFiles
set arguments to arguments & space & (quoted form of POSIX path of anItem)
end repeat
do shell script "/usr/local/bin/spw" & arguments
end open
on run
do shell script "/usr/local/bin/spw"
@jolros
jolros / Info.plist
Created December 31, 2013 03:10
Edits I made in Info.plist after compiling sigmaplotlauncher.scp to an application that allow the application to open SigmaPlot JNB files from the finder. The only change was to adding <string>jnb</string> to the CFBundleTypeExtensions array. See: http://blog.jolros.com/post/71709752383/running-sigmaplot-as-a-mac-os-x-application-using-wine
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array>
@jolros
jolros / gclone
Last active May 30, 2021 14:13
Script that clones a github repository into a nested githubuser/repositoryname directory within the current working directory or directory specified by the GITHUB_CLONE_HOME environment variable. Also works for gists. This allows your github clones to be organized cleanly and consistently. http://blog.jolros.com/consistent-github-cloning
#!/usr/bin/env perl
use File::Path qw(make_path);
use File::Spec;
use strict;
use warnings;
@ARGV || die 'Must provide repository information as an argument';
my $raw = $ARGV[0];