Skip to content

Instantly share code, notes, and snippets.

View gnuhub's full-sized avatar
🎯
Focusing

gnuhub gnuhub

🎯
Focusing
  • Mars
View GitHub Profile
@gnuhub
gnuhub / osx-for-hackers.sh
Created April 11, 2017 21:45 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@gnuhub
gnuhub / gist:226dbbbb223bf941f2bd
Last active August 29, 2015 14:27 — forked from amyreese/gist:6207161
Travis CI config to build against Qt5.0 on Ubuntu 12.04. Requires installing a PPA and certain packages for qt5 support.
before_install:
- sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa
- sudo apt-get update -qq
- sudo apt-get install -qq qt5-qmake qtbase5-dev qtdeclarative5-dev libqt5webkit5-dev libsqlite3-dev
script:
- qmake -qt=qt5 -v
- qmake -qt=qt5
- make
Notes using minstallconfig.xml
- Create base OS X vmx w/ veewee:
* HD must be IDE, not SCSI
* Do not define a specific boot device, VM will boot from DMG attached to CD-ROM later in process
- Obtain "Install OS X Mountain Lion.app"/"Install Mac OS X Lion.app"
- Mount InstallESD.dmg w/ shadow file from "Install Mac OS X Lion.app/Contents/SharedSupport/InstallESD.dmg"
* hdiutil attach "[...]/Install Mac OS X Lion.app/Contents/SharedSupport/InstallESD.dmg" -owners on -shadow /tmp/InstallESD.shadow
do shell script "xcode-select --install"
do shell script "sleep 1"
tell application "System Events"
tell process "Install Command Line Developer Tools"
keystroke return
click button "Agree" of window "License Agreement"
end tell
end tell
@gnuhub
gnuhub / dnspodsh.sh
Last active August 29, 2015 14:08 — forked from zrong/dnspodsh.sh
#!/bin/bash
##############################
# dnspodsh v0.3
# 基于dnspod api构架的bash ddns客户端
# 作者:zrong(zengrong.net)
# 详细介绍:http://zengrong.net/post/1524.htm
# 创建日期:2012-02-13
# 更新日期:2012-03-11
##############################
def jvmRunFlags = '''
-Xmx700m
- ...
'''.split().toList()
def jvmTestFlags = '''
-Dlocally=true
-ea
- ...
'''.split().toList()
@gnuhub
gnuhub / pypod.py
Created June 26, 2012 03:16 — forked from chuangbo/README.md
Python dynamic DNSPod DNS Script
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import httplib, urllib
import socket
import time
params = dict(
login_email="email", # replace with your email
login_password="password", # replace with your password