Skip to content

Instantly share code, notes, and snippets.

View icyleaf's full-sized avatar
🍺
Diving into beer

icyleaf icyleaf

🍺
Diving into beer
View GitHub Profile
@AvdLee
AvdLee / ALSwiftyBeaverCLLogger
Last active April 19, 2017 03:04
CocoaLumberjack logger for SwiftyBeaver
//
// ALSwiftyBeaverCLLogger.swift
//
// Created by Antoine van der Lee on 09/05/16.
// Copyright © 2016 Antoine van der Lee. All rights reserved.
//
import Foundation
import CocoaLumberjack
import SwiftyBeaver
@kukat
kukat / Varmilo VB660M.md
Created July 27, 2014 17:04
Varmilo VB660M 入手 63% 键盘

Filco 圣手二代 87 键青轴用了两年了,对其很满意,但问题还是有的

  1. 有尾巴,要是无线就好了
  2. 青轴声音真的吵,放家里用 GF 嫌弃,放办公室用同事 complain...

Filco 圣手二代 87 键青轴 (键帽大淘宝关键字彩虹键帽Filco 圣手二代 87 键青轴

然后去年看到 Filco 终于出蓝牙键盘了 -- Filco Minila,可这奇葩的布局实在是让人无法接受。

@hzlzh
hzlzh / GitHub-Shop-Group-Purchase.md
Created February 22, 2012 06:25
GitHub Shop Group Purchase

#GitHub Shop Group Purchase ###By:@[hzlzh] 活动地址:http://shop.github.com/
V2EX:[http://www.v2ex.com/t/27492][V2EX]

##活动经验提炼:(写给今后可能的,别的组织者)

  • 仅此一次,本人不会再组织GitHub团了,如果只买贴纸可以考虑。因为瓷器和玻璃制品易碎,在快递行业中和iPad属于一个级别的易损坏品。申通和圆通这类的会拒发,而且不能保价。 (来源于SF快递员)
  • 如果有人要买GitHub Shop中的东西,依然建议另寻组团购买,原因如下:
  1. 组团官方使用大箱子发送到中国,这期间会很安全,你想想,会有那个快递员疯了去扔大箱子?(快递的分发是空抛这种扔来扔去的这个是快递行业内部无法避免的),一个小盒子过来中国,八成会碎,先走UPSP然后是国内邮政平邮
  2. 美国->中国 邮费 $20或$30两个档次,差不多¥100多邮费,比有些东西还贵,如果几个朋友一起,何乐而不为?
@modocache
modocache / jenkinsBuild.sh
Created August 20, 2012 18:54
Jenkins Build Script
#!/bin/sh
set -e
BUILD_NUMBER=$1
die () {
echo >&2 "$@"
@boctor
boctor / BaseViewController.m
Created May 5, 2011 02:08
A base view controller class that when running on the simulator in debug mode, will auto simulate a memory warning every time the view controller's viewDidAppear is called
//
// BaseViewController.m
//
// Created by Peter Boctor on 5/4/11.
//
// Copyright (c) 2011 Peter Boctor
//
// 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
@stantonk
stantonk / doit
Created November 15, 2012 22:46
Install python 2.7.3 on CentOS 5.8
#!/bin/bash
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
yum groupinstall "Development tools"
yum install zlib-devel
yum install bzip2-devel openssl-devel ncurses-devel
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar xf Python-2.7.3.tar.bz2
cd Python-2.7.3
@ravageralpha
ravageralpha / fetchsub.sh
Created October 27, 2012 16:53
shell script get subtitle from shooter.cn
#!/bin/sh
# Author: RA <ravageralpha@gmail.com>
USAGE(){
echo "Usage:$(basename $0) [eng] files..."
}
[ $# -eq 0 ] && USAGE && exit 0
ERROR(){
@mustafaturan
mustafaturan / ruby.2.0.0-setup.sh
Last active May 21, 2019 23:00
ruby 2.0.0 centos 6
#!/usr/bin/env bash
# repository
cd /tmp
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
# system update
yum -y update
yum -y groupinstall "Development Tools"
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick
@xaviervia
xaviervia / nginx-environment.md
Last active July 1, 2019 12:45
Nginx and Docker links with environment variables, a love story

How to add environment variables to nginx.conf

This is the hack approach to adding environment variables to the nginx configuration files. As with most Google results for this search, the reason is Docker.

The setup

I intended to deploy two Docker containers.

@derencius
derencius / xcode.rb
Created March 10, 2011 03:05
Download Xcode using wget. Useful for slow or intermittent connections. it uses wget and mechanize.
require 'rubygems'
require 'mechanize'
if ARGV.size < 3
puts %q{Usage: ruby xcode.rb USERNAME PASSWORD "DOWNLOAD_URL" [WGET_PARAMS]}
puts %q{Example: ruby xcode.rb myusername@apple.com 123456 "https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_4_and_ios_sdk_4.3__final/xcode_4_and_ios_sdk_4.3__final.dmg" }
exit
end
a = Mechanize.new { |agent|