Skip to content

Instantly share code, notes, and snippets.

View zouguangxian's full-sized avatar

Zou Guangxian zouguangxian

View GitHub Profile
@paulirish
paulirish / data-markdown.user.js
Last active February 6, 2024 10:41
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@mediabounds
mediabounds / floatsign.sh
Last active March 31, 2024 18:43
A small bash script to re-sign iOS applications.
# !/bin/bash
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
#!/usr/bin/python
#gypify.py for GYP (http://code.google.com/p/gyp)
#Found @ http://code.google.com/p/gyp/issues/detail?id=82 (Oct 1, 2009)
#Download original @ http://gyp.googlecode.com/issues/attachment?aid=1601673567448205219&name=gypify.py&token=qm9EhXN3mZxrS1pniUgsh5nG6Bs%3A1328804204976
#Attached is a script that converts a set of existing Chromium-dependent
#.sln and .vcproj files to .gyp. It currently supports executable, shared
#library, static library and build event projects. The output .gyp file is
#created by:
@tiejunhu
tiejunhu / split_bootimg.pl
Created February 15, 2012 02:10
updated split_bootimg.pl that outputs base address of boot.img
#!/usr/bin/perl
######################################################################
#
# File : split_bootimg.pl
# Author(s) : William Enck <enck@cse.psu.edu>
# Description : Split appart an Android boot image created
# with mkbootimg. The format can be found in
# android-src/system/core/mkbootimg/bootimg.h
#
# Thanks to alansj on xda-developers.com for
@cluther
cluther / addMultiGraphReport.py
Created July 24, 2012 20:21
Programatically Build a Multi-Graph Report
#!/usr/bin/env python
import sys
import Globals
from Products.ZenUtils.ZenScriptBase import ZenScriptBase
# Check command line options.
if len(sys.argv) < 2:
print >> sys.stderr, "Usage: %s <device>" % sys.argv[0]
sys.exit(1)
@FichteFoll
FichteFoll / Context.sublime-menu
Created August 15, 2012 12:37
Sublime Text 2 plugin; copys multiple selections linewise to the clipboard an prepends the line numbers
[
{ "caption": "Copy with line numbers", "command": "copy_with_line_numbers" }
]
@tmcw
tmcw / xyz_vs_tms.md
Last active April 3, 2024 06:18
The difference between XYZ and TMS tiles and how to convert between them

The difference between XYZ and TMS tiles and how to convert between them

Lots of tile-based maps use either the XYZ or TMS scheme. These are the maps that have tiles ending in /0/0/0.png or something. Sometimes if it's a script, it'll look like &z=0&y=0&x=0 instead. Anyway, these are usually maps in Spherical Mercator.

Good examples are OpenStreetMap, Google Maps, MapBox, MapQuest, etc. Lots of maps.

Most of those are in XYZ. The best documentation for that is slippy map tilenames on the OSM Wiki, and Klokan's Tiles a la Google.

@janimo
janimo / gist:5412727
Created April 18, 2013 13:35
Script to unpack Huawei UPDATE.APP Android firmware blobs
#!/usr/bin/perl
######################################################################
#
# File : split_updata.pl
# Author(s) : McSpoon
# Description : Unpack a Huawei U8220 'UPDATA.APP' file.
# http://pulse.modaco.com
#
# Last Modified : Thu 24 December 2009
# By : McSpoon
-- How to disassemble kernel
Disassemble uncompressed kernel image binary by arm-linux-androideabi-objdump command in ndk
arm-linux-androideabi-objdump --disassemble-all -b binary -m arm --adjust-vma=0xc0008000 kernel.Image > kernel.dasm
-- How to get address for variable ptmx_fops
ptmx_fops is used in function unix98_pty_init.
unix98_pty_init()
{
@siddhadev
siddhadev / gist:5814802
Last active November 9, 2021 17:20
Bash script for fixing subversion's "Working copy text base is corrupt" error
#!/bin/bash
set -e
usage(){
echo "Error $errcode $errorcode at line ${BASH_LINENO[0]} while executing: $BASH_COMMAND"
exit $errorcode
}
trap usage ERR