This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Drop this file in config/initializers to run your Rails project on Ruby 1.9. | |
# This is three separate monkey patches -- see comments in code below for the source of each. | |
# None of them are original to me, I just put them in one file for easily dropping into my Rails projects. | |
# Also see original sources for pros and cons of each patch. Most notably, the MySQL patch just assumes | |
# that everything in your database is stored as UTF-8. This was true for me, and there's a good chance it's | |
# true for you too, in which case this is a quick, practical solution to get you up and running on Ruby 1.9. | |
# | |
# Andre Lewis 1/2010 | |
# encoding: utf-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin border-radius($radius:3px) | |
:-moz-border-radius $radius | |
:-webkit-border-radius $radius | |
:border-radius $radius | |
@mixin border-radius-left($radius:3px) | |
:border-top-left-radius $radius | |
:-moz-border-radius-topleft $radius | |
:-webkit-border-top-left-radius $radius | |
:border-bottom-left-radius $radius |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.bugcloud.android.slider; | |
import android.app.Activity; | |
import android.util.Log; | |
import android.view.MotionEvent; | |
public class SlidableActivity extends Activity { | |
protected static final String TAG = "SlidableActivity"; | |
private static final int ACTION_TYPE_DEFAULT = 0; | |
private static final int ACTION_TYPE_UP = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'uri' | |
BIJIN = "www.bijint.com" | |
now = Time.now | |
#puts "choose your favorite prefecture, jp/gal/hokkaido/sendai/kobe/kyoto/fukuoka/nagoya" | |
#pref = gets.chomp! | |
pref = "jp" | |
dir = "#{ENV['HOME']}/Desktop" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_g | |
class Hole | |
constructor: () -> | |
@SPRING = .1 | |
@FRICTION = .9 | |
@x = _g.document.width() / 2 | |
@y = _g.document.height() / 2 | |
@radius = 3 | |
@radius2 = 14 | |
@vec = {x: 100 * Math.random() - 50, y: 100 * Math.random() - 50} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
streamsAll = [] | |
streams = [] | |
$("#contentPane .Sq>div").each () -> | |
streamsAll.push this | |
return undefined | |
oids = [] | |
for st in streamsAll | |
a = $(st).find(".jr a:first") | |
oid = a.attr('oid') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Shell script that configures gnome-terminal to use solarized theme | |
# colors. Written for Ubuntu 11.10, untested on anything else. | |
# | |
# Solarized theme: http://ethanschoonover.com/solarized | |
# | |
# Adapted from these sources: | |
# https://gist.github.com/1280177 | |
# http://xorcode.com/guides/solarized-vim-eclipse-ubuntu/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tumblr | |
constructor: () -> | |
@offset = Math.floor(Math.random() * 10) | |
apiConsumerKey: "YOUR_KEY" | |
hostName: "glitchgifs.tumblr.com" | |
offset: 0 | |
photoPostsCallback: (body, textStatus, response) -> | |
data = JSON.parse(body) | |
srcs = [] | |
for post in data.response.posts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.7",function($,L){$("#lineupList #listDate ul li").each(function(){var d=$(this).attr("class");if(d==""||d==null||d==undefined){var c=$(this).find("a:first");var b=c.find("img:first").attr("alt");c.attr("target","_blank").attr("href","http://www.youtube.com/results?search_query="+encodeURIComponent(b))}});}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo aptitude install build-essential zlib1g-dev libreadline6-dev libopenssl-ruby git curl wget | |
curl -L https://get.rvm.io | bash -s stable | |
echo 'source ~/.rvm/scripts/rvm' >> ~/.bashrc | |
export PATH=$PATH:$HOME/.rvm/bin | |
rvm pkg install openssl | |
rvm install 1.9.3 --with-openssl-dir=$rvm_path/usr | |
rvm use 1.9.3 | |
echo 'Unless you could run rvm use command, you should run these commands by yourself' |
OlderNewer