Skip to content

Instantly share code, notes, and snippets.

View zouguangxian's full-sized avatar

Zou Guangxian zouguangxian

View GitHub Profile
@rsobik
rsobik / boost.sh
Created November 17, 2013 13:20
Build Boost 1.55.0 for iOS 7 and OS X including 64 Bit
#===============================================================================
# Filename: boost.sh
# Author: Pete Goodliffe
# Copyright: (c) Copyright 2009 Pete Goodliffe
# Licence: Please feel free to use this, with attribution
# Modified version
#===============================================================================
#
# Builds a Boost framework for the iPhone.
# Creates a set of universal libraries that can be used on an iPhone and in the
# (c) 2013 www.nerdenmeister.org
diff -ur ./Build/Resources/MacOSX/Info.plist.xml ./b/Build/Resources/MacOSX/Info.plist.xml
--- ./Build/Resources/MacOSX/Info.plist.xml 2012-02-07 10:36:48.000000000 +0000
+++ ./b/Build/Resources/MacOSX/Info.plist.xml 2014-04-20 22:20:31.000000000 +0100
@@ -38,6 +38,9 @@
<key>LSRequiresCarbon</key>
<true/>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
@plentz
plentz / nginx.conf
Last active March 14, 2025 06:00
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@reidransom
reidransom / gist:6042016
Created July 19, 2013 20:13
Auto-starting VirtualBox VMs on OS X

Auto-starting VirtualBox VMs on OS X

After finding a lot of other posts on the topic that didn't work out for me this one did the trick so I'm reposting for my own sense of self preservation.

Link to original article.

Copy the Virtualbox autostart plist template file to your system's LaunchDaemons folder.

sudo cp \

/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist \

@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active March 7, 2025 14:46
Backend Architectures Keywords and References
@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
-- 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()
{
@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
@tmcw
tmcw / xyz_vs_tms.md
Last active March 3, 2025 22:38
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.

@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" }
]