Skip to content

Instantly share code, notes, and snippets.

@expandrive
expandrive / TrayStateChanger.cs
Created April 15, 2016 02:35 — forked from anaisbetts/TrayStateChanger.cs
Call secret Explorer API to change tray state
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Interop;
namespace SlackNotifier
{
Process: macruby [43003]
Path: /Library/Frameworks/MacRuby.framework/Versions/0.8/usr/bin/macruby
Identifier: macruby
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [26424]
Date/Time: 2010-12-14 16:43:09.588 -0500
OS Version: Mac OS X 10.6.5 (10H574)
Report Version: 6
Process: macruby [42987]
Path: /Library/Frameworks/MacRuby.framework/Versions/0.8/usr/bin/macruby
Identifier: macruby
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [26424]
Date/Time: 2010-12-14 16:39:39.758 -0500
OS Version: Mac OS X 10.6.5 (10H574)
Report Version: 6
@expandrive
expandrive / recursive_digestion.rb
Created December 14, 2010 21:46
Macruby segfault generator
require 'digest'
require 'find'
path = "/Users/jmancuso"
digest = Digest::SHA2.new(512)
Find.find(path) do |entry|
if File.file?(entry) or File.directory?(entry)
stat = File.stat(entry)
@expandrive
expandrive / prettyjson
Created December 7, 2010 20:39
Take JSON from stdin and dump it to stdout in a more readable form
#!/usr/bin/python
# From http://stackoverflow.com/questions/352098/how-to-pretty-print-json-script
# To install paste this into a file named prettyjson that lives in your PATH
# e.g.
# sudo touch /usr/bin/prettyjson
# sudo open -t /usr/bin/prettyjson
# paste this file and save
# sudo chmod +x /usr/bin/prettyjson
"""