This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| """ | |
| parse_delicious_xml.py | |
| First download your bookmarks and restrict to specific tags if desired: | |
| $ curl --user 'username':'password' -o delicious.xml 'https://api.del.icio.us/v1/posts/all' | |
| Extract and count most common domains: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'em-proxy' | |
| require 'http/parser' | |
| require 'uuid' | |
| # > ruby em-proxy-http.rb | |
| # > curl --proxy localhost:9889 www.google.com | |
| host = "0.0.0.0" | |
| port = 9889 | |
| puts "listening on #{host}:#{port}..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ruby getimage.rb -e production -c config/getimage.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ConnectionInfo { | |
| constructor(media="unknown", | |
| className="unknown", | |
| classId=0) { | |
| this.media = media; | |
| this.className = className; | |
| this.classId = classId; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var DOMTokenListSupports = function(tokenList, token) { | |
| if (!tokenList || !tokenList.supports) { | |
| return; | |
| } | |
| try { | |
| return tokenList.supports(token); | |
| } catch (e) { | |
| if (e instanceof TypeError) { | |
| console.log("The DOMTokenList doesn't have a supported tokens list"); | |
| } else { |
OlderNewer