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 'rubygems' | |
| require 'zip' | |
| archive_directory_path = '' | |
| archive_zip_path = '' | |
| Zip::File.open( archive_zip_path, Zip::File::CREATE ) do |zip_file| | |
| Dir[ File.join( archive_directory_path, "**", "**" ) ].each do |file| | |
| zip_file.add( file.sub( "#{ archive_directory_path }/", "" ), file ) | |
| end |
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
| " Don't try to be vi compatible | |
| set nocompatible | |
| " Helps force plugins to load correctly when it is turned back on below | |
| filetype off | |
| " TODO: Load plugins here (pathogen or vundle) | |
| " Turn on syntax highlighting | |
| syntax on |
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
| # | |
| # Given a useragent string, return these results: | |
| # Android version, device model name, type (tablet/phone) | |
| # | |
| import re | |
| def android_details (useragent): | |
| result = {} | |
| result["aVersion"] = "Other" | |
| result["amake"] = "Other" |
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
| Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna! | |
| ([一-龯]) | |
| Regex for matching Hirgana or Katakana | |
| ([ぁ-んァ-ン]) | |
| Regex for matching Non-Hirgana or Non-Katakana | |
| ([^ぁ-んァ-ン]) | |
| Regex for matching Hirgana or Katakana or basic punctuation (、。’) |
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
| # .profile | |
| export TERM=xterm-256color | |
| # .vimrc | |
| syntax on | |
| set background = dark | |
| let g:solarized_termcolors = 256 | |
| colorscheme solarized |
NewerOlder