Skip to content

Instantly share code, notes, and snippets.

View kadashu's full-sized avatar

Jiangcheng Wu kadashu

  • LeanCloud
  • Beijing, China
View GitHub Profile
@waynema02
waynema02 / unzip-gbk.py
Created January 5, 2018 03:46
Unzip the zip file encoded by gbk. ref: https://superuser.com/a/1202386
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# unzip-gbk.py
import os
import sys
import zipfile
import argparse
parser = argparse.ArgumentParser()
@kch
kch / plist-to-yaml.rb
Created August 4, 2010 09:54
converts plist files to really pretty, aligned yaml files with mostly literal utf8 strings
#!/usr/local/bin/ruby
# encoding: UTF-8
require 'yaml'
require "base64"
require 'rexml/document'
class PList < BasicObject
ELEMENT_PROCESSORS = {}
def self.process_element_named(name, &block); ELEMENT_PROCESSORS[name.to_s] = block; end
def self.process_element(elt) ; ELEMENT_PROCESSORS[elt.name][elt]; end