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/perl | |
use Mysql; | |
use strict; | |
use vars qw($school_name); | |
use vars qw($pass); | |
require "./cgi-lib.pl"; |
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
alias tm="~/.tmux/tmux.sh" |
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
## BEGIN SOPASTRIKE | |
## Add to the top of your .htaccess file | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
# The first time is listed as greater than 7:59:59am. | |
# The second time is less than 8:00:00pm (20:00:00). | |
# |
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
{!-- Displays the number of new ExpressionEngine members by month --} | |
{exp:query sql="select count(*) AS total, month(from_unixtime(join_date)) as month, year(from_unixtime(join_date)) as year from exp_members group by year, month order by year DESC, month DESC"} | |
<br/>{year}-{month}: {total} | |
{/exp:query} |
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 'yaml' | |
require 'logger' | |
require 'active_record' | |
namespace :db do | |
def create_database config | |
options = {:charset => 'utf8', :collation => 'utf8_unicode_ci'} | |
create_db = lambda do |config| | |
ActiveRecord::Base.establish_connection config.merge('database' => nil) |