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 / 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
@gnuhub
gnuhub / version.h
Created February 7, 2012 13:48
ruby version
#define RUBY_VERSION "1.9.3"
#define RUBY_PATCHLEVEL 0
#define RUBY_RELEASE_DATE "2011-10-30"
#define RUBY_RELEASE_YEAR 2011
#define RUBY_RELEASE_MONTH 10
#define RUBY_RELEASE_DAY 30
#include "ruby/version.h"
@gnuhub
gnuhub / sugar_version.php
Created February 7, 2012 13:43
sugar_version
$sugar_version = '6.3.1';
$sugar_db_version = '6.3.1';
$sugar_flavor = 'CE';
$sugar_build = '7095';
$sugar_timestamp = '2011-12-16 10:54am';
@gnuhub
gnuhub / test.c
Created February 5, 2012 01:06
print argc argv
#include <stdio.h>
int main(int argc,char **argv){
printf("命令行参数总个数为:%d\n",argc);
int i;
for(i=0;i<=argc;i++)
{
if(argv[i]!=NULL){
printf("第%d个参数为:%s \n",i,argv[i]);
}
}
@gnuhub
gnuhub / main.c
Created February 5, 2012 00:41
deep in argc and argv in main()
int main(int argc, char **argv)