Skip to content

Instantly share code, notes, and snippets.

View rtanglao's full-sized avatar
😃
you rock :-)

Roland Tanglao rtanglao

😃
you rock :-)
View GitHub Profile
@rtanglao
rtanglao / gist:61632
Created February 10, 2009 22:26
download acquia and pushing to github
download acquia drupal 1.2.1 and unzip it
cd acquia-drupal-6 (or whatever the directory you just unzipped in the previous step was called)
mv * ..
mv .htaccess ..
cd ..
rmdir acquia-drupal-1.2.1
mkdir acquia-drupal-6
cd acquia-drupal-6
git init
cp drupal acquia 1.2.1 folder to acquia-drupal-6
550 cp -r /Users/rolandtanglao/Downloads/acquia-drupal-1.2.4-update/* .
551 ls
552 git status
553 git add modules/acquia/acquia_connector/acquia_agent/rpc.acquia.com.pem
554 git add modules/acquia/acquia_search/
555 git addmodules/acquia/admin_menu/admin_menu-rtl.css
556 git addmodules/acquia/admin_menu/images/arrow-rtl.png
557 git addmodules/acquia/admin_menu/images/bkg_tab.png
558 git addmodules/acquia/admin_menu/translations/es.po
559 git addmodules/acquia/admin_menu/translations/nl.po
dd if=/dev/disk1s1 of=BUG_backup.ext3.bin
tar xvfjv bug-image-production-bug-R1.4-rootfs.ext3.bz2
dd if=bug-image-production-bug-R1.4-rootfs.ext3.bz2 of=/dev/disk1s1
95105+1 records in
95105+1 records out
sudo /usr/local/sbin/fsck.ext3 /dev/disk1s1
e2fsck 1.39 (29-May-2006)
Couldn't find ext2 superblock, trying backup blocks...
/usr/local/sbin/fsck.ext3: Bad magic number in super-block while trying to open /dev/disk1s1
The superblock could not be read or does not describe a correct ext2
@rtanglao
rtanglao / gist:88369
Created March 31, 2009 19:54
createTicket.php
<?php
require_once("Cerb4WebApi.php");
$access_key = "<elided for security purposes>";
$secret_key = "<elided for security purposes>";
$cerb4 = new Cerb4_WebApi($access_key, $secret_key);
$url = 'http://hd.raincitystudios.com/admin/webapi/parser/parse.xml';
<?php
require_once("Cerb4WebApi.php");
$access_key = "<elided for security purposes>";
$secret_key = "<elided for security purposes>";
$cerb4 = new Cerb4_WebApi($access_key, $secret_key);
$url = 'http://hd.raincitystudios.com/admin/webapi/parser/parse.xml';
require 'satisfaction'
sfn = Satisfaction.new
#let's find the subject of my latest topic
sfn.people["rtanglao"]
#puts sfn.people["rtanglao"].topics.page(1, :order => 'recently_created').first.tags[1].page(1)
unloaded = sfn.people["rtanglao"].topics.page(1, :order => 'recently_created').
first.load()
#puts 'unloaded:', unloaded.inspect()
puts 'inspect on unloaded', unloaded.inspect()
puts 'url', unloaded.url
irb(main):125:0> last_topic
=> <Sfn::Topic me_too_count: 1 slug: help_with_my_junk created_at: 2009/08/27 03:32:31 +0000 author: namekiturlhttp://api.getsatisfaction.com/people/704876id704876 last_active_at: 2009/08/27 03:54:30 +0000 url: http://api.getsatisfaction.com/topics/525709 subject: Help with My Junk. id: 525709 follower_count: 1 at_sfn: http://getsatisfaction.com/mozilla_messaging/topics/help_with_my_junk content: So it doesn't matter how many times I click a email/mailer to be JUNK, it keeps coming back even though address is the same, subject is the same, from is the same. How do I make something JUNK and make it stay JUNK? company_id: 45188 most_recent_activity: comment flag_count: 0 reply_count: 1 status: style: question>
irb(main):126:0> my_tags = last_topic.tags.get(1)
=> <Sfn::Tag /tags/1 UNLOADED>
irb(main):127:0>
irb(main):007:0> sfn.people["rtanglao"].topics.page(1, :order => 'recently_created').first.tags.get(1)
=> <Sfn::Tag /tags/1 UNLOADED>
irb(main):008:0>
import sys
import csv #to read in the csv file
import hashlib #needed to produce shorter contributor node names
'''
campaign_finance.py
script to produce a graphviz dot file suitable for passing into neato, using a
CSV as input. Only really a prototype for showing it is possible...
@rtanglao
rtanglao / getReply.rb
Created September 20, 2009 05:13
getReply.rb
require 'json'
require 'net/http'
require 'pp'
def getResponse(url)
http = Net::HTTP.new("api.getsatisfaction.com",80)
url = "/" + url