Discover gists
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
// ==UserScript== | |
// @name nifty_cilp_rss_search | |
// @namespace http://github.com/monmon | |
// @description googleの検索結果に自分のクリップを入れる | |
// @include http://www.google.co.jp/* | |
// ==/UserScript== | |
(function(){ | |
var user = 'monmon'; // 自分のユーザ名 | |
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
Activity after 7-25-2008 | |
Results for Felix Geisendörfer: | |
# of commits : 23 | |
# of lines committed: 4050 | |
Results for Tim Koschützki: | |
# of commits : 3 | |
# of lines committed: 3764 | |
Felix Geisendörfer wins in commit count with 23 commits! |
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
<?php | |
class CommunitiesController extends AppController{ | |
/** | |
* undocumented function | |
* | |
* @return void | |
* @access public | |
*/ | |
function index() { | |
$communities = $this->Community->find('all'); |
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
// ==UserScript== | |
// @name gist_to_google_gadgets.user.js | |
// @namespace http://github.com/tkmr | |
// @description install greasemonkey (user.js) | |
// @include http://gist.github.com/* | |
// @include https://gist.github.com/* | |
// ==/UserScript== | |
(function() { | |
var xml_src = "http://gist.github.com/raw/2651/b9c7261032c09389b6fd69633aeb6ed34ae6b98f"; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Module> | |
<ModulePrefs title="Gist google gadgets" /> | |
<UserPref name="src" display_name="JSsrc" required="false" /> | |
<Content type="html"><![CDATA[ | |
<div id="target__MODULE_ID__"></div> | |
<script type="text/javascript"> | |
var prefs = new _IG_Prefs(__MODULE_ID__); | |
var script = document.createElement("script"); | |
script.src = prefs.getString("src"); |
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
# Created by Nando Vieira | |
# Usage: compound_interest(:amount => 1000, :interest => 0.1, :times => 5) | |
def compound_interest(options={}) | |
options[:amount] * ((1 + options[:interest]) ** options[:times]) | |
end |
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
<?php | |
/** | |
* 非同期実行の意味なしサンプル | |
*/ | |
class A { | |
private $name; | |
public function __construct($name){ | |
$this->name = $name; | |
} | |
/** |
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
# Copyright (c) 2008 Phusion | |
# http://www.phusion.nl/ | |
# | |
# 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 | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# |
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
// based on implementation from rails http://rails-doc.org/rails/ActionView/Helpers/DateHelper/distance_of_time_in_words | |
// explanation at http://blog.peelmeagrape.net/2008/7/26/time-ago-in-words-javascript-part-1 | |
// unittests at http://blog.peelmeagrape.net/assets/2008/7/26/distanceOfTimeInWords.html | |
function distanceOfTimeInWords(fromTime, toTime, includeSeconds) { | |
var fromSeconds = fromTime.getTime(); | |
var toSeconds = toTime.getTime(); | |
var distanceInSeconds = Math.round(Math.abs(fromSeconds - toSeconds) / 1000) | |
var distanceInMinutes = Math.round(distanceInSeconds / 60) | |
if (distanceInMinutes <= 1) { | |
if (!includeSeconds) |
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
#!/Users/yanxu/jython2.2.1/jython | |
# encoding: utf-8 | |
""" | |
poi.py | |
Created by yanxu on 2008-04-09. | |
Copyright (c) 2008 sina. All rights reserved. | |
""" | |
from org.apache.poi.hssf.usermodel import * |