Skip to content

Instantly share code, notes, and snippets.

@libin
libin / gist:7158
Created August 25, 2008 21:19 — forked from defunkt/gist:6443
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.
@libin
libin / gist:10365
Created September 12, 2008 03:01 — forked from dmix/gist:10309
require 'rubygems'
require 'scrubyt'
Scrubyt.logger = Scrubyt::Logger.new
market_data = Scrubyt::Extractor.define do
fetch 'http://Salesforce.com/'
contents "/html/body"
end
puts market_data.to_xml
market_data = Scrubyt::Extractor.define do
fetch 'http://www.salesforce.com/products/sales-force-automation/sales-management/'
Hello,
Nice to meet you, how is everything, hope all is well with you. My name is Madam Avelin Regato, I found your contact after reading your profile I picked interest to contact you. I’ve something very important which I would love to share with you privately, therefore, would advise you to kindly write me back on: (avelin_regato7@yahoo.com) so that I’ll give you details. Waiting anxiously for your anticipated corporation,
Yours,
Madam Avelin
Email me on: avelin_regato7@yahoo.com
@libin
libin / snippet.sh
Created January 16, 2009 19:27 — forked from anonymous/snippet.sh
parse_git_branch() {
RSLT=''
GIT_BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' | awk '{print $2}'`
if [ "$GIT_BRANCH" ]
then
GIT_STATUS=`git status 2> /dev/null | grep 'working directory clean'`
CLR='2'
if [ "$GIT_STATUS" ]
then
CLR='2'
+-------------------------+-------------------+
| username | geoloc_ip_address |
+-------------------------+-------------------+
| Carsten | 208.124.190.170 |
| mawstools | 66.241.81.107 |
| kaitomono | 209.53.139.139 |
| oksohow | 122.169.38.118 |
| VoonC | 116.206.165.235 |
| binaljavia | 124.247.216.162 |
| mehovering | 220.226.16.252 |
In response to all the responses to:
http://twitter.com/rtomayko/status/1155906157
You should never do this in a source file included with your library,
app, or tests:
require 'rubygems'
The system I use to manage my $LOAD_PATH is not your library/app/tests
<!DOCTYPE html>
<html>
<head>
<title>Twitter: Don't Click</title>
<style>
iframe {
position: absolute;
width: 550px;
height: 228px;
top: -170px;
@libin
libin / x
Created February 12, 2009 18:41
CmdUtils.CreateCommand({
name: ['git'],
arguments: [{role: 'object', nountype: noun_arb_text, label: 'query'}],
icon: "http://github.com/favicon.ico",
homepage: "http://mrgossett.com",
author: {name: "Tim Gossett", email: "tim@mrgossett.com"},
license: "Creative Commons",
description: "Search GitHub repositories",
help: "Start typing a search term",
execute: function(args)
@libin
libin / gist.scpt
Created February 12, 2009 18:41 — forked from Lytol/gist.scpt
-- Create a gist from the specified text or the contents of the selected file
--
-- Author: Brian Smith <bsmith@swig505.com>
using terms from application "Quicksilver"
on process text str
my growlRegister()
do shell script "echo '" & str & "' | /usr/local/bin/gist"
growlNotify("Gist Created!", "URL has been copied to clipboard")
#!/usr/bin/env ruby
# iPhone Application Post Build Script
# 1. 在XCode左边栏选中相应的Target
# 2. 在菜单中选择Project -> New Build Phase -> New Run Script Build Phase .
# 3. 弹出的对话框中,Shell里填写/usr/bin/ruby, Script中填写上面的脚本代码.
# http://www.robinlu.com/blog/archives/371
if ENV["BUILD_STYLE"] == "Distribution" && ENV["ARCHS"] == 'armv6'
common_git_paths = %w[/usr/local/bin/git /usr/local/git/bin/git /opt/local/bin/git]