Skip to content

Instantly share code, notes, and snippets.

View ed-at-agari's full-sized avatar

Edward Halferty ed-at-agari

View GitHub Profile
#!/usr/bin/env ruby
pwd = `pwd`
branches = [
[:master, %w(
blah
asdf-core
)],
[:main, %w(
#!/usr/bin/env ruby
branch_name = ARGV[0]
unless branch_name.nil?
system %(
git clean -f -d
git rebase --abort
git branch -D tempbranch &> /dev/null
find . -name "post-checkout" | xargs rm -rf
@ed-at-agari
ed-at-agari / dolocal.rb
Created February 2, 2022 18:30
dolocal
#!/usr/bin/env ruby
pwd = `pwd`
apps = [
["asdf", %(
blah blah
)],
["xyz", %(
blah blah
@ed-at-agari
ed-at-agari / dockerkillall.rb
Created February 2, 2022 18:29
Dockerkillall
#!/usr/bin/env ruby
docker_ps_output = `docker ps`
containers_raw = docker_ps_output.split(/\n/).reject { |line| line =~ /^CONTAINER/ }
if containers_raw.empty?
puts "No containers already! Yay!"
exit
end
#include <ncurses.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#define MAX_BRANCH_NAME_LEN 4096
#define MAX_BRANCHES 100
#define COLOR_PAIR_HEADER 1