Skip to content

Instantly share code, notes, and snippets.

View eccyan's full-sized avatar

eccyan eccyan

View GitHub Profile
@akisute
akisute / NetworkInformation.h
Created November 4, 2010 07:28
NetworkInformation.h Objective-C class to retrieve network information. Licensed under MIT License.
//
// NetworkInformation.h
//
// Created by akisute on 10/10/07.
// Copyright 2010 株式会社ビープラウド.
/*
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
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@mikhailov
mikhailov / installation.sh
Created November 23, 2010 15:18
nginx+passenger (real production config)
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776
$ cd /usr/src
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
@deguchi
deguchi / app.coffee
Created January 6, 2011 05:23
CoffeeScriptのクラスを使ったTitaniumのサンプルコード
# debug function
log = (obj) -> Titanium.API.log obj
Titanium.UI.setBackgroundColor '#000'
class TabGroup
constructor: () ->
@tabGroup = Titanium.UI.createTabGroup()
return @tabGroup
@func09
func09 / Ti.UI.ImageView#imageWithCache
Created April 20, 2011 10:37
TitaniumのImageViewでリモートURLの画像を永続的にキャッシュする
$$$ = {};
$$$.ui = {};
$$$.ui.createImageView = function(options){
var ui = Ti.UI.createImageView(options);
// 画像を永続化してキャッシュ
ui.imageWithCache = function(url){
url = url.replace(/\?[0-9]+$/,'');
@bkimble
bkimble / gist:1365005
Last active May 2, 2024 01:27
List local memcached keys using Ruby
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []
@vincentpaca
vincentpaca / log
Created January 2, 2012 07:58
Ruby 1.9.3p0 Rails 3.1.3 Rake 0.9.2.2 breaks on rake db:migrate
pax@ubuntu:~/projects/missionhub$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
pax@ubuntu:~/projects/missionhub$ rails -v
Rails 3.1.3
pax@ubuntu:~/projects/missionhub$ rake -V
rake, version 0.9.2.2
pax@ubuntu:~/projects/missionhub$ bundle exec rake db:migrate --trace
DEPRECATION WARNING: Yajl's JSON gem compatibility API is going to be removed in 2.0
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
@eccyan
eccyan / brainfuck.rb
Created February 8, 2012 16:44
Brainf*ck in Ruby
# -*- coding: utf-8 -*-
class String
def fuck(output=STDOUT, input=STDIN)
identity = lambda do |value|
return value
end
increment = lambda do |value|
return value+1
end
decrement = lambda do |value|
@rakhmad
rakhmad / clojure.md
Created April 17, 2012 15:55
Setting Up Clojure on OS X

Setting Up Clojure on OS X

I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.

I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.

This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.

Step 1: Getting Clojure (1.3)

@uasi
uasi / git-svn.markdown
Last active May 27, 2024 04:48
git-svn の使い方メモ

git-svn の使い方メモ

git-svn の使い方をメモする。他によいプラクティスがあれば指摘していただけるとありがたい。

用語

SVN のブランチと git のブランチが混在しているため、ここではブランチという語を以下のように区別する。

  • ブランチ、 SVN ブランチ:$SVN_REPO/branches 以下にあるディレクトリ
  • ローカルブランチ:git のローカルブランチ
  • リモートブランチ:git のリモートブランチ