Skip to content

Instantly share code, notes, and snippets.

Avatar
🆒

Patrick Oscity padde

🆒
View GitHub Profile
@FradSer
FradSer / iterm2_switch_automatic.md
Last active Jul 13, 2021
Switch iTerm2 color preset automatic base on macOS dark mode.
View iterm2_switch_automatic.md
  1. Add switch_automatic.py to ~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunch with:
#!/usr/bin/env python3

import asyncio
import iterm2

async def main(connection):
    async with iterm2.VariableMonitor(connection, iterm2.VariableScopes.APP, "effectiveTheme", None) as mon:
@padde
padde / alfred-extension.sh
Last active Dec 11, 2015
Template for writing Alfred Extensions in Ruby
View alfred-extension.sh
TMPFILE=".$(uuidgen).tmp.rb"
cat > $TMPFILE <<RUBYSCRIPT
# TODO: replace this with real code
puts "Running Ruby #{RUBY_VERSION}"
puts "Arguments are #{ARGV.inspect}"
RUBYSCRIPT
/usr/bin/env ruby $TMPFILE "{query}"
rm $TMPFILE
@olivierlacan
olivierlacan / gist:4062929
Last active May 1, 2021 — forked from Gregg/gist:968534
Code School Screencasting Framework
View gist:4062929

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
@mdales
mdales / dvtcolorconvert.rb
Created Jan 24, 2011 — forked from aktowns/dvtcolorconvert.rb
Fork of aktowns' excellent little script for converting xcode3 color themes to xcode4. Just added rubygems import
View dvtcolorconvert.rb
#!/usr/bin/env ruby
# This script converts xccolorthemes to dtvcolorthemes for porting xcode 3.x themes to xcode 4.x
# created by ashley towns <ashleyis@me.com>
# Public domain.
# ./dvtcolorconvert <inputfile>
# spits out a .dtvcolortheme file
require 'rubygems'
require 'plist'
raise "Error: need a source file #{__FILE__} [file.xccolortheme]" if ARGV.length == 0