Skip to content

Instantly share code, notes, and snippets.

View levey's full-sized avatar

Jiangang Zhu levey

  • Bindo Labs
  • Shanghai, China
View GitHub Profile
@levey
levey / .tmux.conf
Last active August 29, 2015 14:13 — forked from snuggs/.tmux.conf
##############################
# _
# | |_ _ __ ___ _ ___ __
# | __| '_ ` _ \| | | \ \/ /
# | |_| | | | | | |_| |> <
# \__|_| |_| |_|\__,_/_/\_\
#
#############################
#
# COPY AND PASTE
@levey
levey / .tmux.conf
Last active August 29, 2015 14:13 — forked from snuggs/.tmux.conf
##############################
# _
# | |_ _ __ ___ _ ___ __
# | __| '_ ` _ \| | | \ \/ /
# | |_| | | | | | |_| |> <
# \__|_| |_| |_|\__,_/_/\_\
#
#############################
#
# COPY AND PASTE
@levey
levey / .tmux.conf
Last active August 29, 2015 14:13 — forked from snuggs/.tmux.conf
##############################
# _
# | |_ _ __ ___ _ ___ __
# | __| '_ ` _ \| | | \ \/ /
# | |_| | | | | | |_| |> <
# \__|_| |_| |_|\__,_/_/\_\
#
#############################
#
# COPY AND PASTE
//
// Created by Damien DeVille on 6/23/13.
// Copyright (c) 2013 Damien DeVille. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
extern id _objc_setNilReceiver(id newNilReceiver);
@levey
levey / NSObject+DetailDescription.h
Created June 30, 2013 02:20
Detail Description for NSObject
@interface NSObject(DetailDescription)
- (NSString *)detailDescription;
@end
@levey
levey / id3.rb
Created April 8, 2013 03:46
Replace MP3 title tag to file name
require 'rubygems'
require 'mp3info'
ext = ".mp3"
Dir.entries("./").select { |f|
if File.extname(f) == ext
title = File.basename(f, ext)
Mp3Info.open(f) do |mp3|
mp3.tag.title = title
@levey
levey / UIImage+Border.m
Created October 2, 2012 02:17
A way for UIImage's Anti-aliasing in Objective-C
//
// UIImage+Border.m
//
// Created by Levey on 11/10/11.
// Copyright (c) 2011 Vanillatech. All rights reserved.
//
#import "UIImage+Border.h"
@levey
levey / NSData+AESCrypt.h
Created August 27, 2012 04:20 — forked from Harinder/NSData+AESCrypt.h
Adding methods to NSData and NSString using categories to provide AES256 encryption on iOS
//
// NSData+AESCrypt.h
//
// AES Encrypt/Decrypt
// Created by Jim Dovey and 'Jean'
// See http://iphonedevelopment.blogspot.com/2009/02/strong-encryption-for-cocoa-cocoa-touch.html
//
// BASE64 Encoding/Decoding
// Copyright (c) 2001 Kyle Hammond. All rights reserved.
// Original development by Dave Winer.
@levey
levey / gist:1797444
Created February 11, 2012 07:30 — forked from samqiu/railscasts.rb
download railscast video
#!/usr/bin/ruby
require 'rss'
p 'Downloading rss index'
rss_string = open('http://feeds.feedburner.com/railscasts').read
rss = RSS::Parser.parse(rss_string, false)
videos_urls = rss.items.map { |it| it.enclosure.url }.reverse
videos_filenames = videos_urls.map {|url| url.split('/').last }