This file contains 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 | |
import sys, time | |
if __name__ == '__main__': | |
args = sys.argv[1:] | |
for arg in args: | |
print(time.ctime( int(arg) )) |
This file contains 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 | |
import sys, xml.sax.saxutils | |
if __name__ == '__main__': | |
args = sys.argv[1:] | |
for arg in args: | |
print xml.sax.saxutils.unescape( arg ) |
This file contains 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 | |
import sys, xml.sax.saxutils | |
if __name__ == '__main__': | |
args = sys.argv[1:] | |
for arg in args: | |
print xml.sax.saxutils.escape( arg ) |
This file contains 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 | |
import sys, urllib | |
if __name__ == '__main__': | |
args = sys.argv[1:] | |
for arg in args: | |
print urllib.unquote( arg ) |
This file contains 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 | |
import sys, urllib | |
if __name__ == '__main__': | |
args = sys.argv[1:] | |
for arg in args: | |
print urllib.quote( arg ) |
This file contains 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 'fileutils' | |
class MigrateUsersToPaperclip < ActiveRecord::Migration | |
def up | |
# Rename the old "mugshot" column to "old_file_name", since User.mugshot will now try to do Paperclip stuff | |
rename_column :users, :mugshot, :old_file_name | |
# Rename asset directories to pluralize | |
File.rename("public/system/user","public/system/users") |
NewerOlder