#Dump and Restore MySQL DB Quick Ref
##Dump The MySQL Table
mysqldump -u username -p -r my_output.sql my_database
##Compress Output with 7zip using the PPMd Algorithm
7z a -t7z my_output.7z my_output.sql -m0=PPMd
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Basic HTML5 Template</title> | |
| <link href="stylesheets/style.css" rel="stylesheet" type="text/css" media="screen" /> | |
| <script src="example.js"></script> | |
| </head> | |
| <body> |
| #!/bin/bash | |
| (find . -name "*.png")|while read pngfile | |
| do | |
| PNG_FILE=$pngfile | |
| PNG_TMP=$RANDOM.compressallpng.png | |
| pngcrush -brute $PNG_FILE $PNG_TMP | |
| mv $PNG_TMP $PNG_FILE | |
| done |
| # I needed a way to quickly test PHP stuff without setting it up somewhere in Apache. | |
| # This works great. You can keep this in your repo and whenever you want to run your code do: | |
| # lighttpd -f lighttpd.conf | |
| # from the root and off you go. | |
| server.bind = "0.0.0.0" | |
| server.port = 8000 | |
| server.document-root = CWD | |
| server.errorlog = CWD + "/logs/lighttpd.error.log" | |
| accesslog.filename = CWD + "/logs/lighttpd.access.log" |
| #Gets current time, then formats current time for SQL. | |
| Time.now.to_s(:db) |
| #For some reason, this took forever to figure out... | |
| passenger start -a 127.0.0.1 -p 3000 -d -e production |
| /* | |
| Get acceleration data from Chronos watch. | |
| Taken from info posted at: http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/32714.aspx | |
| Based off of the latest Python code on the Chronos wiki that I wrote. | |
| Copyright (c) 2010 Sean Brewer | |
| Permission is hereby granted, free of charge, to any person | |
| obtaining a copy of this software and associated documentation |
#Dump and Restore MySQL DB Quick Ref
##Dump The MySQL Table
mysqldump -u username -p -r my_output.sql my_database
##Compress Output with 7zip using the PPMd Algorithm
7z a -t7z my_output.7z my_output.sql -m0=PPMd
| config.action_mailer.delivery_method = :smtp | |
| config.action_mailer.smtp_settings = { | |
| :address => "mail.our_clients_domain.com", | |
| :port => 25, | |
| :domain => 'our_clients_domain.com', | |
| :user_name => 'whatever_system_user_we_chose@our_clients_domain.com', | |
| :password => 'this_should_be_a_relatively_good_password', | |
| :authentication => 'plain', | |
| #:enable_starttls_auto => false | |
| } |
| \documentclass[12pt]{article} | |
| \usepackage{sectsty} | |
| \usepackage{fullpage} | |
| \usepackage[light,math]{kurier} | |
| \usepackage[T1]{fontenc} | |
| \begin{document} | |
| \thispagestyle{empty} |
| > 5[0] | |
| => 1 | |
| > 5[1] | |
| => 0 | |
| > 5[2] | |
| => 1 | |
| > 5[3] | |
| => 0 |