Skip to content

Instantly share code, notes, and snippets.

View yeoupooh's full-sized avatar

Thomas Jinwoo Min yeoupooh

View GitHub Profile
@romannurik
romannurik / DashboardLayout.java
Created March 23, 2011 05:06
A custom Android layout class that arranges children in a grid-like manner, optimizing for even horizontal and vertical whitespace.
/*
* ATTENTION:
*
* This layout is now maintained in the `iosched' code.google.com project:
*
* http://code.google.com/p/iosched/source/browse/android/src/com/google/android/apps/iosched/ui/widget/DashboardLayout.java
*
*/
/*
@stefanfoulis
stefanfoulis / findauthors.sh
Created April 8, 2011 12:37
How to sync svn to git
#!/usr/bin/env bash
# Run this script inside a SVN checkout of the project
authors=$(svn log -q | grep -e '^r' | awk 'BEGIN { FS = "|" } ; { print $2 }' | sort | uniq)
for author in ${authors}; do
echo "${author} = NAME <USER@DOMAIN>";
@zeuxisoo
zeuxisoo / app.js
Created June 9, 2011 04:15
Titanium mobile parse html
Ti.include('lib/htmlparser.js');
Ti.include('lib/soupselect.js');
var select = soupselect.select;
var body = '<html><head><title>Test</title></head>'
+ '<body>'
+ '<img src="http://l.yimg.com/mq/i/home/HKGallery.gif" />'
+ '<div id="block">'
+ ' <div class="row">Row 1</div>'
@shaobin0604
shaobin0604 / Android.mk
Created August 5, 2011 05:40
ffmpeg android make file
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := ffmpeg
include $(LOCAL_PATH)/config.mak
LOCAL_CFLAGS := -DHAVE_AV_CONFIG_H -std=c99
@guymac
guymac / setcover.cpp
Last active July 22, 2021 20:54
Embeds cover art in music files (MP3, M4A/AAC, Ogg/Vorbis)
/*
Command-line application for embedding JPEG cover art in MP3, MP4 and OGG audio files.
Based on taglib-1.7 (debian libtag1-dev)
and libb64 (http://libb64.sourceforge.net/) needed for OGG Vorbis embedded cover art
g++ -I/usr/local/include/taglib -L/usr/local/lib -ltag -lb64 setcover.cpp -o setcover
g++ -I/opt/homebrew/include/taglib -L/opt/homebrew/include/b64 -ltag -lb64 setcover.cpp -o setcover
*/
@mignev
mignev / gist:1683387
Created January 26, 2012 15:46
Simple example of webview in appcelerator
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
@bricef
bricef / AES.c
Last active May 11, 2024 21:15
A simple example of using AES encryption in Java and C.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* MCrypt API available online:
* http://linux.die.net/man/3/mcrypt
*/
#include <mcrypt.h>
@jameskbride
jameskbride / HTTBuilderBinary.groovy
Created September 29, 2012 14:26
HTTPBuilder Binary Response Example
def getBinaryStream(params) {
def data
def http = new HTTPBuilder("http://google.com/baseURI")
http.request(Method.GET, ContentType.BINARY) {req ->
//uri.path = "/a/relative/path/here"
uri.port = "8080"
uri.query = [userName: "user", password:"password"]
headers.'User-Agent' = 'Mozilla/5.0'
headers.'Accept' = 'application/octet-stream'
response.'200' = {resp, binary ->
@ricardoalcocer
ricardoalcocer / index.js
Created November 25, 2012 19:45
Titanium Allow - Creating a FaceBook-like UI
function doClick(e) {
alert($.label.text);
}
function showmenu(e){
$.main.animate({left:200,duration:100});
}
function hidemenu(e){
$.main.animate({left:0,duration:100});
@bob-sims
bob-sims / 00-readme.md
Last active December 10, 2015 08:18 — forked from zeuxisoo/app.js
Common-JS screenscraping in Titanium Mobile using htmlparser.js + soupselect.js

Common-JS screenscraping in Titanium Mobile using htmlparser.js + soupselect.js

Handy when YQL won't work due to robots.txt blocking.

Derived from prior art by @zeuxisoo: https://gist.github.com/1016047