Navigation Menu

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
Rolands-MBP:BIKETOWORKSHOP_COM_SURGE rolandtanglao$ nslookup t.co
Server: 10.244.75.5
Address: 10.244.75.5#53
Non-authoritative answer:
Name: t.co
Address: 199.59.150.44
Name: t.co
Address: 199.59.148.12
Rolands-MBP:BIKETOWORKSHOP_COM_SURGE rolandtanglao$ dig @8.8.8.8 t.co
; <<>> DiG 9.8.3-P1 <<>> @8.8.8.8 t.co
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40518
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
@rtanglao
rtanglao / sorting tags in python.py
Last active August 29, 2015 13:56
sorting in python
# fron https://wiki.python.org/moin/HowTo/Sorting
>>> tags_tuple = [('ux', 55), ('slow', 15)]
>>> sorted(tags_tuple, key=lambda tag:tag[1])
[('slow', 15), ('ux', 55)]
>>>

#SUMO Forum Support Report 2013/12/10-2013/12/16 ##Tag Summary

  1. flash:6
  2. ux:5
  3. webcompat:4
  4. detailsmissing:4
  5. bookmarks:4
  6. sync:3
  7. offtopic:3
  8. fullscreen:3
<html class="normal" _type="talk"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Script-Type" content="text/javascript"><meta http-equiv="Content-Style-Type" content="text/css"><style>html {font-family:'Courier';font-size:9pt;background-color:white;color:black;word-wrap:break-word;margin:0;padding:3px 4px 10px 4px;}body {margin:0;padding:0}img {border:1px solid #aaa;vertical-align:top;}object {vertical-align:top;}hr {margin:0.5em 2em;}.line {margin:0 -4px; padding:0 4px 1px 4px; clear:both;}.line[alternate=even] {}.line[alternate=odd] {}.line[_type=action] .sender:before {content: '• ';white-space: nowrap;}.inlineimage {margin: 10px 0 15px 40px;max-width: 200px;max-height: 150px;-webkit-box-shadow: 2px 2px 2px #888;}.avatar {display: inline;max-width: 24px;max-height: 24px;margin-right: 3px;vertical-align: middle;}.url { word-break: break-all; }.address { text-decoration: underline; word-break: break-all; }.highlight { color: #f0f; font-weight: bold; }.time

Keybase proof

I hereby claim:

  • I am rtanglao on github.
  • I am rtanglao (https://keybase.io/rtanglao) on keybase.
  • I have a public key whose fingerprint is 7E56 E626 B6C0 4F11 3816 995E 7645 A150 CC2C C25E

To claim this, I am signing this object:

@rtanglao
rtanglao / find-url-fragment-in-mongodb.js
Created May 26, 2014 23:08
find a piece of a url in a mongodb field
db.photos.findOne({"url_sq" : {$regex : ".*548386304_8c12cfe51c_s.*"}})
@rtanglao
rtanglao / _.md
Created July 14, 2014 23:12
test widget
Verifying that +rtanglao is my Bitcoin username. You can send me #bitcoin here: https://onename.io/rtanglao
@rtanglao
rtanglao / getTop10.rb
Created March 22, 2015 17:17
get top 10 colours of an image
#!/usr/bin/env ruby
require 'rubygems'
require 'RMagick'
TOP_N = 10 # Number of swatches
# Create a 1-row image that has a column for every color in the quantized
# image. The columns are sorted decreasing frequency of appearance in the
# quantized image.
def sort_by_decreasing_frequency(img)