Skip to content

Instantly share code, notes, and snippets.

View atelic's full-sized avatar

Eric Barbour atelic

View GitHub Profile
@atelic
atelic / tmux.conf
Last active November 5, 2023 23:39
A vim-friendly tmux config
# change prefix to Ctrl-a (like in gnu-screen)
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# shell
set -g default-command /bin/zsh
set -g default-shell /bin/zsh
@atelic
atelic / findWithAttr.js
Last active August 29, 2015 14:24
Find with attribute in JS
// source: https://stackoverflow.com/questions/7176908/how-to-get-index-of-object-by-its-property-in-javascript
function findWithAttr(array, attr, value) {
for(var i = 0; i < array.length; i += 1) {
if(array[i][attr] === value) {
return i;
}
}
}
var Data = [
@atelic
atelic / kill-tmux.sh
Created July 8, 2015 04:00
Kill tmux and all processes it spawned
tmux list-panes -s -F "#{pane_pid} #{pane_current_command}" | grep -v tmux | awk '{print $1}' | xargs kill -9
@atelic
atelic / README.md
Last active August 29, 2015 14:24 — forked from mattsears/README.md

Todo.rb

Todo.rb is a simple command-line tool for managing todos. It's minimal, straightforward, and you can use it with your favorite text editor.

Getting Started

Todo.rb doesn't require any third-party gems so you can copy the file anywhere and use it as long as it's executable:

[core]
excludesfile = /Users/you/.gitignore
editor = emacsclient -t
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[user]
# Capitalized, short (50 chars or less) summary
# ----------------------------------------------|
#WIP:
#Add:
#Mod:
#Ref:
#Fix:
#Rem:
# More detailed description. Wrap at 70 characters
servers = (
{ address = "eu.irc6.net"; chatnet = "IRCnet"; port = "6667"; },
{ address = "open.ircnet.net"; chatnet = "IRCnet"; port = "6667"; },
{ address = "irc.efnet.org"; chatnet = "EFNet"; port = "6667"; },
{
address = "irc.undernet.org";
chatnet = "Undernet";
port = "6667";
},
{ address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; },
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.20784313976764679</real>
$(document).keydown(function(e) {
if (e.keyCode === 13) {
$target = $(e.target);
if ($target.hasClass('whatever-class')) {
var $button = $target.siblings('span').find('button');
if(!$button.is(':disabled')) {
$button.click();
}
}
}
#!/usr/bin/perl
#
# Google Drive direct download of big files
# ./gdown.pl 'gdrive file url' ['desired file name']
#
# v1.0 by circulosmeos 04-2014.
# http://circulosmeos.wordpress.com/2014/04/12/google-drive-direct-download-of-big-files
#
use strict;