Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| on run {input, parameters} | |
| set cmd to "vim -c startinsert" | |
| if input is not in {} then | |
| set myPath to POSIX path of input | |
| set cmd to "vim " & quote & myPath & quote | |
| end if | |
| tell application "iTerm" | |
| activate | |
| set myTerm to (current terminal) |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| <?php | |
| //* Do NOT copy the opening PHP tag | |
| //* Add Google Fonts to our header | |
| add_action( 'wp_enqueue_scripts', 'ck_load_google_fonts' ); | |
| function ck_load_google_fonts() { | |
| wp_enqueue_style( 'ck-google-fonts', '//fonts.googleapis.com/css?family=Open+Sans', array(), CHILD_THEME_VERSION ); | |
| } |
| /** | |
| * Setup Module with `highlight` filter | |
| */ | |
| var JekyllApp = angular.module('JekyllApp', [], function ($routeProvider, $locationProvider) { | |
| $locationProvider.html5Mode(false); | |
| }); | |
| JekyllApp.filter('highlight', function () { | |
| return function (text, filter) { |
| #compdef godoc | |
| typeset -A opt_args | |
| local context state line | |
| local pkgdir usrpkgdir | |
| pkgdir="$GOROOT/src/pkg" | |
| usrpkgdir="$GOPATH/src" | |
| godoctmpl=~/.godoc_templates |
| # golang image where workspace (GOPATH) configured at /go. | |
| FROM golang:latest | |
| # Copy the local package files to the container’s workspace. | |
| ADD . /go/src/github.com/shijuvar/golang-docker | |
| # Build the golang-docker command inside the container. | |
| RUN go install github.com/shijuvar/golang-docker | |
| # Run the golang-docker command when the container starts. |
This is pretty specific to my setup but the idea can be adapted to work with pretty much anything.
Go has a flag package which makes parsing command line arguments really easy.
package main