Skip to content

Instantly share code, notes, and snippets.

View neomafo88's full-sized avatar
🏠
Remote

Neoma Fong neomafo88

🏠
Remote
View GitHub Profile
@rsms
rsms / spotlight-ax.m
Created May 10, 2009 16:45 — forked from liesen/gist:109666
A small utility that observes any changes of a search field of a given application
/* Cocoa accessibility framework for intercepting Spotlight user input. */
#import <Cocoa/Cocoa.h>
#import <AppKit/NSAccessibility.h>
static CFStringRef kSpotlightBundleIdentifier = CFSTR("com.apple.spotlight");
static void SpotlightCallback(AXObserverRef observer,
AXUIElementRef element,
package com.pivotallabs;
import android.util.Log;
import com.xtremelabs.robolectric.Robolectric;
import com.xtremelabs.robolectric.RobolectricTestRunner;
import com.xtremelabs.robolectric.util.Implements;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(RobolectricTestRunner.class)
@Schnouki
Schnouki / movmd.py
Created January 12, 2011 00:57
A small metadata parser for MP4 containers, designed to edit dates saved by digital cameras on .mov videos.
#!/usr/bin/env python3
# -*- mode: python -*-
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law. You can redistribute it and/or modify it under
# the terms of the Do What The Fuck You Want To Public License, Version 2, as
# published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
# details.
# Some useful resources:
@GChristensen
GChristensen / srt-sort.py
Created April 19, 2011 14:41
Sort srt subtitle entries by time
# Sort srt subtitle entries by time
# (C) 2011 g/christensen (gchristnsn@gmail.com)
# Launch this script in a directory containing srt subtitles
# or pass the directory name as an argument
import os
import sys
import re
import glob
@ymirpl
ymirpl / gist:1052094
Created June 28, 2011 20:21
Python unicode e-mail sending
#coding: utf-8
from cStringIO import StringIO
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.header import Header
from email import Charset
from email.generator import Generator
import smtplib
# Example address data
@nfarring
nfarring / index.html
Created July 29, 2011 06:17
Ubuntu Apache default index.html file
<html><body><h1>It works!</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>
</body></html>
@pokstad
pokstad / JsonPlistConverter.py
Created September 5, 2011 19:23
Convert between JSON and Plist Files
#!/usr/bin/env python
import plistlib
import json
import tkFileDialog
import re
import sys
file_to_open = tkFileDialog.askopenfilename(message="Select an existing plist or json file to convert.")
converted = None
#!/usr/bin/env python
# -*- coding: rot-13 -*-
vs __anzr__ == h'__znva__':
cevag h'Uryyb, Jbeyq!'
@davidnunez
davidnunez / gist:1404789
Created November 29, 2011 13:20
list all installed packages in android adb shell
pm list packages -f
@tmiz
tmiz / build_openssl_dylib.sh
Last active November 1, 2023 13:18
Build latest OpenSSL Universal Binary on OSX
#!/bin/bash
OPENSSL_VERSION="1.0.1g"
curl -O http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_i386
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_x86_64
cd openssl_i386