Skip to content

Instantly share code, notes, and snippets.

View jmeridth's full-sized avatar
:shipit:
pushing buttons on my keyboard

Jason Meridth jmeridth

:shipit:
pushing buttons on my keyboard
View GitHub Profile
#!/bin/bash
# Best use case is to create a file "update_local_db.sh" in your project folder and then call the command with bash update_local_db
function LastBackupName () {
heroku pgbackups | tail -n 1 | awk '{print $1;}'
}
# This part assumes you have a low limit on no. of backups allowed
old_backup=$(LastBackupName)
sing System;
sing Castle.ActiveRecord;
amespace ActiveRecordSample
[ActiveRecord]
public class User : ActiveRecordBase<User>
{
private int id;
private string username;
private string password;
sing System;
sing Castle.ActiveRecord;
amespace ActiveRecordSample
[ActiveRecord]
public class User : ActiveRecordBase<User>
{
private int id;
private string username;
private string password;
@jmeridth
jmeridth / list_last_commit_in_entire_repository_for_each_author.sh
Last active December 10, 2015 04:38
list last commit in entire repository for each author
#!/bin/bash
function display() {
local result=$(git log -1 --all --pretty=format:'%cn - %cr (%cd) %h %s' --date-order --author=$1)
echo "$result"
}
function getauthors() {
git log --format='%ae' | sort -u
}
@jmeridth
jmeridth / WindowsLiveWriterError.png
Created October 25, 2012 06:18
lostechies_wordpress_issue_38
WindowsLiveWriterError.png
@jmeridth
jmeridth / windows_fresh_install.txt
Created October 9, 2012 18:38
What I like to install on my new windows boxes
- Chrome
- Firefox
- Console2
- msysgit
- AVG Anti-Virus
- Notepad++
- VPN client
- Virtual Box
- MS Office
- Hipchat
@jmeridth
jmeridth / stash_service.sh
Created September 20, 2012 18:34
Atlassian Stash startup script
#!/bin/bash
# RUN_AS: The user to run stash as. Its recommended that you create a separate user account for security reasons
RUN_AS=jmeridth
# STASH_HOME: The path to the Stash installation. Its recommended to create a symbolic link to the latest version so
# the process will still work after upgrades.
STASH_HOME="/var/www/apps/stash"
stashctl() {
@jmeridth
jmeridth / run_db_migrations_if_changes_present.rb
Created November 28, 2011 18:42
Runs rails db migrations if changes exist in changes
#!/usr/bin/env ruby
`rake db:migrate &amp;&amp; rake db:test:prepare` if `git diff --name-only HEAD@{1} HEAD`.index("db/migrations)