Skip to content

Instantly share code, notes, and snippets.

Description

When using Homebrew (http://brew.sh) and searching formulas or pull requests you may get the dreaded error message: Github API Rate limit exceeded

Let's fix that! (yeah!)


Short version

Create a new Personal Token in your Github Account Settings (Sidebar: Applications) and then copy the Token. In the Terminal, use export HOMEBREW_GITHUB_API_TOKEN=YOURAPITOKENWITHFUNKYNUMBERSHERE (change that to your API Token) or add that to your .bash_profile and then do source .bash_profile.

# http://EditorConfig.org
root = true
[*]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
12:28:30.830 [INFO] [org.gradle.BuildLogger] Starting Build
12:28:30.833 [DEBUG] [org.gradle.BuildLogger] Gradle user home: /Users/vmlinz/.gradle
12:28:30.833 [DEBUG] [org.gradle.BuildLogger] Current dir: /Users/vmlinz/Projects/hello-scaloid-gradle
12:28:30.834 [DEBUG] [org.gradle.BuildLogger] Settings file: null
12:28:30.834 [DEBUG] [org.gradle.BuildLogger] Build file: null
12:28:30.847 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Starting to build the build sources.
12:28:30.849 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Gradle source dir does not exist. We leave.
12:28:30.852 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found env project properties: []
12:28:30.853 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found system project properties: []
12:28:30.933 [DEBUG] [org.gradle.api.internal.artifacts.mvnsettings.DefaultLocalMavenRepositoryLocator] No local repository in Settings file defined. Using default path: /Users/vmlinz/
12:30:07.206 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding IP addresses for network interface awdl0
12:30:07.207 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a loopback interface? false
12:30:07.210 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a multicast interface? true
12:30:07.210 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding remote address /fe80:0:0:0:9070:68ff:fe48:7ba8%awdl0
12:30:07.211 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding remote multicast interface awdl0
12:30:07.211 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Adding IP addresses for network interface en0
12:30:07.212 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a loopback interface? false
12:30:07.212 [DEBUG] [org.gradle.messaging.remote.internal.inet.InetAddressFactory] Is this a multicast interface? true
12:30:07.213 [

测试平台:DigitalOcean VPS ubuntu14.04 x64, strongswan5.2.2

运行以下命令请使用root权限

一:安装strongswan

由于ubuntu软件仓库中strongswan版本较低,因此从官网源码编译安装

apt-get install build-essential     #编译环境
aptitude install libgmp10 libgmp3-dev libssl-dev pkg-config libpcsclite-dev libpam0g-dev     #编译所需要的软件
@vmlinz
vmlinz / IPSecDemo.m
Last active August 29, 2015 14:22 — forked from zqqf16/IPSecDemo.m
- (void)viewDidLoad
{
[super viewDidLoad];
// init VPN manager
self.vpnManager = [NEVPNManager sharedManager];
// load config from perference
[_vpnManager loadFromPreferencesWithCompletionHandler:^(NSError *error) {
@vmlinz
vmlinz / .editorconfig
Last active August 29, 2015 14:25 — forked from rafamaciel/.editorconfig
Basic configuration of editorconfig to work with python
;
; Global Editor Config for Adaptive Labbers
;
; This is an ini style configuration. See http://editorconfig.org/ for more information on this file.
;
; Top level editor config.
root = true
; Always use Unix style new lines with new line ending on every file and trim whitespace
[*]
end_of_line = lf
@vmlinz
vmlinz / 1readme.md
Last active August 29, 2015 14:26 — forked from jszmajda/1readme.md
Data Serialization: JSON, MsgPack, ProtoBufs

Deploy Rails 4 app with Dokku on DigitalOcean

Install dokku

First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel

Then ssh with root account, run this in termianl:

$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
@vmlinz
vmlinz / introrx.md
Last active August 27, 2015 05:11 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.