Skip to content

Instantly share code, notes, and snippets.

View brennanneoh's full-sized avatar

Brennan Neoh brennanneoh

View GitHub Profile
@mikechau
mikechau / ecs-run
Created October 29, 2017 08:19 — forked from vcastellm/ecs-run
Run task and wait for result in AWS ECS
#!/usr/bin/env bash
set -e
function usage() {
set -e
cat <<EOM
##### ecs-run #####
Simple script for running tasks on Amazon Elastic Container Service
One of the following is required:
Required arguments:
@rpbaltazar
rpbaltazar / Superhero names
Created August 16, 2016 05:18
super hero names - aka version name
"A-Bomb"
"Abomination"
"Absorbing"
"Ajax"
"Alien"
"Amazo"
"Ammo"
"Angel"
"Animal"
"Annihilus"
@Gajendracis
Gajendracis / curl: (7) Failed to connect to get.rvm.io port 443: No route to host
Created October 8, 2015 10:30
curl: (7) Failed to connect to get.rvm.io port 443: No route to host
sudo echo ipv4 >> ~/.curlrc
#!/bin/bash
# GUI-related packages
pkgs="
xserver-xorg-video-fbdev
xserver-xorg xinit
gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa
gstreamer1.0-libav
epiphany-browser
@hlissner
hlissner / replace.sh
Last active September 11, 2023 10:14
Bulk search & replace with ag (the_silver_searcher)
# ag <https://github.com/ggreer/the_silver_searcher>
# usage: ag-replace.sh [search] [replace]
# caveats: will choke if either arguments contain a forward slash
# notes: will back up changed files to *.bak files
ag -0 -l $1 | xargs -0 perl -pi.bak -e "s/$1/$2/g"
# or if you prefer sed's regex syntax:
ag -0 -l $1 | xargs -0 sed -ri.bak -e "s/$1/$2/g"
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@mbbx6spp
mbbx6spp / capistrano_git_tasks.rb
Created July 24, 2009 19:16
Git (submodule) Capistrano tasks
# 2009 Copyright Susan Potter <me at susanpotter dot net>
# You can read her software development rants at: http://geek.susanpotter.net
# Released under CreativeCommons-attribution-noncommercial-sharealike license:
# http://creativecommons.org/licenses/by-nc-sa/1.0/
namespace :git do
namespace :submodule do
desc "Initializes submodules"
task :init, :roles => :app do
invoke_command "cd #{current_path} && git submodule init", :via => run_method
end