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
@AaronMT
AaronMT / manifest-pull.py
Last active January 4, 2016 21:28
manifest pull and test
$ cat manifests | while read line ; do echo $line; curl -IL http://dapk.net/application.apk?manifestUrl=$line --connect-timeout 30; done
#!usr/bin/env/python
import argparse
import requests
UAS = {
"b2g": "Mozilla/5.0 (Mobile; rv:18.1) Gecko/18.1 Firefox/18.1",
"fxa": "Mozilla/5.0 (Android; Mobile; rv:26.0) Gecko/26.0 Firefox/26.0"
}
@dethe
dethe / gist:6945741
Created October 12, 2013 04:11
Mozilla limerick
A browser that came from Mozilla
Let me download so fast it was killa
With standards so fine
The whole web felt like mine
So I built some apps with no filla
@sagotsky
sagotsky / getsatisfaction_update_topic.php
Created July 1, 2013 14:07
Updates a topic on getsaitsfaction.
<?php
/*
* Attempting to update a getsatisfaction topic from the api.
*/
set_include_path('/opt/pear');
require_once('HTTP/Request2.php');
$url = 'https://api.getsatisfaction.com/topics/api_topic_test'; //slug works here. haven't tested id.
@bmann
bmann / selfhostedrssreaders.md
Last active December 17, 2015 00:38
Self-hosted RSS Readers

My bias is towards PaaS compatible implementations (i.e. no full LAMP server required). Russell Beattie has the definitive and updated list of all readers right now: http://www.russellbeattie.com/blog/readerpocalypse-the-players

  • Stringer - Ruby-based reader - Sinatra, PostgreSQL, designed to run on Heroku
  • Leselys - Python / Mongo / Redis, designed to run on Heroku
  • CommaFeed - Java + AngularJS + MySQL, runs on OpenShift
  • BirdReader - the only Node-based feed reader I could find. Uses CouchDB / Cloudant as the DB, no instructions for PaaS hosting
@pssguy
pssguy / global.R
Created May 1, 2013 21:14
Shiny App showing ranking of 140+ TV Shows by episode
# load required packages
library(shiny)
library(shinyIncubator)
library(googleVis)
library(ggplot2)
library(stringr)
library(plyr)
library(XML)
library(httr)
library(Hmisc)
@sillygwailo
sillygwailo / bash.sh
Last active July 16, 2023 23:09
Beer in my terminal prompt on Fridays
# The following code goes in your ~/.profile
#
# This propmpt shows a beer when you launch a Terminal window on a Fridays.
# It checks every time you get a new prompt. A minute after 11:59M on a
# Thursday, if you press enter, it will add beer to the prompt. A minute
# after 11:59 PM on a Friday, no more beer.
#
# This is for terminals that use the Bash shell, which was the default for
# MacOS previous to Catalina.
@rtanglao
rtanglao / montage40000.sh
Last active December 16, 2015 15:19
make a 200x200 jpeg out of 100,000 75x75 images (I am not sure this will actually work)
gm montage -verbose -adjoin -tile 200x200 +frame +shadow +label -adjoin -geometry '75x75+0+0<' @first40000.txt first40000.jpg #This worked!!!!
find . -name '*.jpg' -exec montage -tile 200x200 {} + #first try that didn't work
find . -name '*.jpg' -exec montage -tile 200x200 {} montage.jpg \; #second try that i think will work
find . -name '*.jpg' -exec montage -adjoin -tile 316x316 {} montage.png \; # third try?
find . -name '*.jpg' -exec montage -verbose -adjoin -tile 316x316 +frame +shadow +label -adjoin -geometry 75x75+0+0 {} montage.png \;
# fourth try - error: all white iamge produced!
# http://www.imagemagick.org/Usage/montage/#montage
# http://jamietalbot.com/2011/01/31/you-need-a-montage/
ls -tr > files.txt
gm montage -verbose -adjoin -tile 316x316 +frame +shadow +label -adjoin -background -geometry 75x75+0+0 @files.txt montage.jpg #the winner!
@MichelleGlauser
MichelleGlauser / gist:5321620
Last active December 15, 2015 20:49
Company update banner with AJAX call to API and a JS cookie for limited views
<!-- Update banner code using API -->
<!-- HEAD TAG: -->
<style>
#updates
{
background-color: #fffa61;
width: 100%;
margin-bottom: 2px;