Skip to content

Instantly share code, notes, and snippets.

View ijoseph's full-sized avatar
🐆

Isaac Joseph ijoseph

🐆
View GitHub Profile
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@mixu
mixu / find-old-files.sh
Created September 4, 2014 21:02
Find oldest files in a git repo
git ls-tree -r --name-only HEAD | while read filename; do
echo "$(git log -1 --format="%at | %h | %an | %ad |" -- $filename) $filename"
done
@mwender
mwender / impbcopy.m
Last active April 29, 2024 02:40
Command line copy an image file to the clipboard in Mac OS X. See first comment for install instructions.
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
#import <unistd.h>
BOOL copy_to_clipboard(NSString *path)
{
// http://stackoverflow.com/questions/2681630/how-to-read-png-image-to-nsimage
NSImage * image;
if([path isEqualToString:@"-"])
{
// http://caiustheory.com/read-standard-input-using-objective-c
@n8henrie
n8henrie / dbox_sync.py
Last active November 14, 2021 14:44
One-way sync of local directory to Dropbox using Dropbox API V2 and python3.
"""dbox_sync.py
One-way sync of local directory to Dropbox using Dropbox API V2 and python3.
Dependencies:
- dropbox (`pip3 install dropbox`)
Minimal modifications from:
https://github.com/dropbox/dropbox-sdk-python/blob/master/example/updown.py
@fpapado
fpapado / print_today.py
Last active January 18, 2024 08:17
Gets and prints the tasks for "today", from the Todoist API. Intended to be used alongside https://github.com/Doist/todoist-python.
# Use the todoist API to get tasks from the current day
import todoist
from datetime import datetime
# Log user in; switch to OAuth eventually...
api = todoist.TodoistAPI()
def get_todays_tasks(email, password):
@tomsing1
tomsing1 / luigi_first_steps.md
Last active October 7, 2023 13:23
First steps with the Luigi workflow manager

First steps with the Luigi workflow manager

As an introduction into Luigi, I am following this tutorial with some modifications, e.g. installation using conda.

The problems and solutions described in the examples below have led to the development of sciluigi,

@tossmilestone
tossmilestone / Flake8.txt
Created March 30, 2018 06:55
Flake8 integrated with PyCharm
How to manually setup flake8 as PyCharm external tool
File / Settings / Tools / External Tools / Add
Name: Flake8
Program: $PyInterpreterDirectory$/python
Parameters: -m flake8 --max-complexity 10 --ignore E501 $FilePath$
Working directory: $ProjectFileDir$
Output Filters / Add
Name: Filter 1
@tbutts
tbutts / tmux-migrate-options.py
Last active February 29, 2024 08:11
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
#
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#
@thiagoghisi
thiagoghisi / bluetooth-restart.sh
Created July 7, 2019 23:56
Script for Mac OSX to Restart Bluetooth service & Reconnect all recently paired devices
#!/bin/bash
echo "Restarting bluetooth service..."
blueutil -p 0 && sleep 1 && blueutil -p 1
echo "Waiting bluetooth service to be restored..."
until blueutil -p | grep "1" >/dev/null; do sleep 1; done
echo "Searching for devices not connected..."
devices=($(blueutil --paired | grep "not connected" | awk -F '[ ,]' '{print $2}'))
@inactivist
inactivist / luigi_first_steps.md
Last active July 13, 2023 09:12 — forked from tomsing1/luigi_first_steps.md
First steps with the Luigi workflow manager

First steps with the Luigi workflow manager

As an introduction into Luigi, I am following this tutorial with some modifications, e.g. installation using conda.

The problems and solutions described in the examples below have led to the development of sciluigi,