Skip to content

Instantly share code, notes, and snippets.

View evancummings's full-sized avatar

Evan Cummings evancummings

View GitHub Profile
@evancummings
evancummings / gist:10152860
Created April 8, 2014 16:35
List All COM Components on a Local Machine
'http://www.devx.com/vb2themax/Tip/18726
' this code assumes that you have used this Imports statement
' Imports Microsoft.Win32
' Print ProgID, CLSID, and path of all the COM components
' installed on this computer.
Sub DisplayCOMComponents()
' Open the HKEY_CLASSES_ROOT\CLSID key
Dim regClsid As RegistryKey = Registry.ClassesRoot.OpenSubKey("CLSID")
@evancummings
evancummings / gist:10010810
Created April 6, 2014 19:59
Log Into Postgres
sudo -u postgres psql postgres
@evancummings
evancummings / gist:9490189
Last active April 6, 2022 19:17
Watch network traffic from Android App
# Use ADB to find and pull an Android package from device
adb shell pm list packages
adb shell pm path com.package
adb pull /data/app/com.package.app.apk
# With APK local, can now adb push to device and run it
# Use tcpdump to log traffic to mon.txt
sudo tcpdump -A dst port 80 > mon.txt
@evancummings
evancummings / gist:3731015
Created September 16, 2012 04:39
Finds a control at any depth in the provided container's heirarchy
private Control FindControlRecursive(Control root, string id)
{
if (root.ID == id)
{
return root;
}
foreach (Control c in root.Controls)
{
Control t = FindControlRecursive(c, id);
@evancummings
evancummings / gist:1697250
Created January 29, 2012 04:49
Precompiling Assets for Rails 3.1 Asset Pipeline
bundle exec rake assets:precompile
@evancummings
evancummings / gist:997855
Created May 29, 2011 15:24
Removing HTML Markup Characters from a String
protected string RemoveHTMLMarkup(string str)
{
return Regex.Replace(str, @"<(.|\n)*?>", String.Empty);
}