Skip to content

Instantly share code, notes, and snippets.

Sergey Tikhonov haqu

Block or report user

Report or block haqu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am haqu on github.
  • I am haqu (https://keybase.io/haqu) on keybase.
  • I have a public key whose fingerprint is 97A1 696A ABA7 D93E 7FFC 7C6C D74B F945 4E4E E3F6

To claim this, I am signing this object:

@haqu
haqu / gist:1016550
Created Jun 9, 2011
decoding PNG images from IPA package
View gist:1016550
mkdir _png
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -d _png -revert-iphone-optimizations -q *.png
@haqu
haqu / gist:978315
Created May 18, 2011
Ludum Dare stats usage example
View gist:978315
$ ./stats.rb Draknek
Getting number of votes and coolness from Ludum Dare ratings page
and calculating current position based on the "votes" stat.
1. deepnight (106:3)
2. natpat (65:18)
3. adamatomic (59:0)
4. haqu (55:288)
5. intmain (50:13)
@haqu
haqu / stats.rb
Created May 17, 2011
Getting number of votes and coolness from Ludum Dare ratings page
View stats.rb
#!/usr/bin/env ruby -wKU
# if you don't want to provide your username each time
# as an argument, you can set it here:
user = "" # <-- your username
# default stat to compare: votes or coolness
compare = "votes" # or "coolness"
######################################################
@haqu
haqu / ava.rb
Created Feb 21, 2011
Domain availability checker
View ava.rb
#!/usr/bin/env ruby -wKU
# Examples of usage:
# $ ava domain.com another.* unique765.{com,net}
# [-] domain.com
# [-] another.com
# [-] another.net
# [+] another.st
# [+] unique765.com
# [+] unique765.net
@haqu
haqu / lip.rb
Created Feb 21, 2011
IP Location on Google Maps
View lip.rb
#!/usr/bin/env ruby -w
# Example of usage:
# $ ./lip.rb snippets.dzone.com
# Hostname: snippets.dzone.com
# Country Code: US
# Country Name: United States
# Region: CA
# Region Name: California
# City: Los Angeles
@haqu
haqu / istudio-recent-comments.php
Created May 7, 2010
Recent comments for iStudio theme
View istudio-recent-comments.php
<?php
/**
* Plugin Name: iStudio Recent Comments
* Version: 1.0
* Plugin URI: http://gist.github.com/393013
* Description: Recent comments for iStudio theme
* Author: Sergey Tikhonov
* Author URI: http://haqu.net
*/
class WP_Widget_iStudio_Recent_Comments extends WP_Widget {
View relative_date.php
<?
# relative_date
# usage: relative_date("2009-09-09 9:09:09") => "9 minutes ago"
# just now, 25 seconds ago... yesterday, 5 days ago, 3 months ago
function pluralize($count,$word) {
if($count == 0) {
return "no ".$word."s";
} else if($count == 1) {
return "1 ".$word;
@haqu
haqu / rmultirename
Created May 28, 2009 — forked from vrybas/rmultirename.rb
mass rename
View rmultirename
#!/usr/bin/env ruby
def show_usage
puts "Usage: #{$0} [PATTERN] [REPLACEMENT]"
puts "Example: #{$0} htm html"
exit
end
pattern = ARGV[0] || show_usage
replace = ARGV[1] || show_usage
@haqu
haqu / wefollow.rb
Created May 21, 2009
follow wefollow
View wefollow.rb
#!/usr/bin/env ruby
# script to extract and follow users from wefollow directory
# example:
# $ ./wefollow.rb iphonedev
# this will extract users from http://wefollow.com/tag/iphonedev
# and add them to your 'following' list
tag = ARGV[0] || exit
You can’t perform that action at this time.