Skip to content

Instantly share code, notes, and snippets.

View stve's full-sized avatar

Steve Agalloco stve

View GitHub Profile

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@stve
stve / DeleteItemsMarkAsRead
Created January 5, 2015 03:27
mark deleted items as read in Microsoft Outlook
if application "Microsoft Outlook" is running then
tell application "Microsoft Outlook"
set deletedMessages to messages of deleted items
repeat with aMessage in deletedMessages
if is read of aMessage is not true then
set aMessage's is read to true
end if
end repeat
end tell
end if
{
"created_at": "Wed Feb 04 02:49:10 +0000 2015",
"id": 562805030382993400,
"id_str": "562805030382993408",
"text": "너무 뚝뚝끊겨서 움짤이.....큽..... 프레임이......... http://t.co/fp2oOWsB2z",
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"truncated": false,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
{
"created_at": "Wed Feb 04 06:07:23 +0000 2015",
"id": 562854913135607800,
"id_str": "562854913135607808",
"text": "RT @Miru3192: 본격 시간낭비시키는 움짤 http://t.co/tRrBKRwPWU\"",
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
"truncated": false,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
#
# Recommended minimum configuration:
#
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
@stve
stve / gist:30841
Created December 1, 2008 20:52 — forked from jsierles/gist:29838
#!/usr/bin/env ruby
#
# Find bloating passengers and kill them gracefully. Run from cron every minute.
#
MEM_LIMIT = ARGV[0] || 500
module Process
def self.running?(pid)
begin
@stve
stve / gist:31672
Created December 3, 2008 20:04 — forked from jsierles/gist:31100
#!/usr/bin/env ruby
#
# fetch hosts from amazon EC2 meta-data
#
# Based on http://dysinger.net/2008/10/13/using-amazon-ec2-metadata-as-a-simple-dns
#
%w(logger optparse rubygems right_aws resolv pp).each { |l| require l }
LOGGER = Logger.new("/var/log/fetch_hosts.log")
#!/usr/bin/env ruby
command = '/usr/bin/passenger-memory-stats'
memory_limit = 200 # megabytes
def running?(pid)
begin
return Process.getpgid(pid) != -1
rescue Errno::ESRCH
return false
RELEASE_OUTPUT_PATH = File.expand_path("~/Projects/releases/Squeemote")
TARGET_NAME = "Squeemote"
CONFIGURATION = ENV['CONFIGURATION'] || "Distribution"
SDK_VERSION = ENV['SDK'] || 'iphoneos2.2'
task :release do
puts "* Bumping build version."
`agvtool bump -all`
puts "* Building #{CONFIGURATION} release."
# by Giles Bowkett
# http://gilesbowkett.blogspot.com/2009/04/unshiftfiledirnamefile.html
# >> File.here("README.textile")
# => "/Users/dancroak/dev/ecology/README.textile"
class File
def self.here(string)
join(expand_path(dirname(__FILE__), string))
end
end