Skip to content

Instantly share code, notes, and snippets.

View birchestx's full-sized avatar

Jo Baker birchestx

  • ShipperHQ
  • Austin, TX
View GitHub Profile
find . -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \;
In config.xml
<controller_action_layout_generate_xml_before>
<observers>
<add_new_layout>
<class>wsafreightcommon/observer</class>
<method>addNewLayout</method>
</add_new_layout>
</observers>
</controller_action_layout_generate_xml_before>
@birchestx
birchestx / add_code_shortcode
Created December 29, 2013 12:19
Add shortcode [code]some code[/code] to wordpress
<?php
/*
Plugin Name: Code Shortcode
Description: Add shortcode [code]some code[/code] to wordpress
Version: 1.0
Author: Karen Baker
License: GPL2
*/
@birchestx
birchestx / git_status
Created December 30, 2013 04:11
git status on all subdirectories
find . -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} status \;
defaults write com.apple.finder AppleShowAllFiles TRUE
git config --global core.excludesfile '~/.gitignore'
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
@birchestx
birchestx / git_targets.xml
Created January 6, 2014 00:16
git targets for use with ant
<?xml version="1.0" encoding="UTF-8"?>
<project name="git_targets" basedir="." >
<!-- ===============================
Git tasks
==================================== -->
<macrodef name = "git">
<attribute name = "command" />
<attribute name = "dir" default = "" />
<element name = "args" optional = "true" />
<sequential>
<target name="CheckState">
<exec executable="${App.path}"
resultproperty="App.state"
failonerror="false"/>
<echo message="App state was: ${App.state}" />
</target>
@birchestx
birchestx / remove_tag.sh
Created January 6, 2014 01:44
Remove tag. Use with care! e.g. remove_tag.sh 2.5
#!/usr/bin/env bash
git tag -d $1
git push origin :refs/tags/$1
@birchestx
birchestx / add_line_above_blank
Created January 6, 2014 02:08
This will add the line specified with a line break at end above any empty lines in file. I used this in our ant build
:1,$s/^$/Dimensional.extension.changelog_dir=Shipusa\r