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 AddSetPositionsStoredProc < ActiveRecord::Migration | |
| STORED_PROC_NAME = 'set_positions' | |
| CREATE_STORED_PROC_SQL = %Q{ | |
| CREATE PROCEDURE #{STORED_PROC_NAME}() | |
| BEGIN | |
| DECLARE done INT DEFAULT 0; | |
| DECLARE pid INT; | |
| DECLARE curs CURSOR FOR SELECT DISTINCT parent_id FROM units; |
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 'active_record/fixtures' | |
| namespace :data do | |
| # pipe separated values and yaml for now | |
| EXTENSIONS = ['psv', 'yml'] | |
| desc 'Truncate and load tables with seed data' | |
| task :seed => :environment do | |
| EXTENSIONS.each do |ext| |
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
| database_name: | |
| adapter: sqlserver | |
| mode: ODBC | |
| dsn: 'DRIVER=FreeTDS;TDS_Version=8.0;SERVER=Your_Server_Name;DATABASE=Your_Database_Name;Port=1433;uid=Your_UID;pwd=Your_PWD;' |
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
| database_name: | |
| adapter: sqlserver | |
| mode: ODBC | |
| dsn: 'DRIVER=/usr/local/lib/libtdsodbc.so;TDS_Version=8.0;SERVER=Your_Server_Name;DATABASE=Your_Database_Name;Port=1433;uid=Your_UID;pwd=Your_PWD;' |
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
| SELECT | |
| CASE WHEN GROUPING( | |
| CASE WHEN service_grade_code IN ('E01','E02','E03','E04','E05','E06','E07','E08','E09','O01','O02','O03','O04','O05','O06','O07','O08','O09','W01','W02','W03','W04','W05') THEN | |
| service_grade_code | |
| ELSE | |
| 'Unknown' | |
| END | |
| ) = 1 THEN | |
| 'All Ranks' | |
| ELSE |
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
| SELECT | |
| CASE WHEN GROUPING(service) = 1 THEN 'All' ELSE service END service, | |
| SUM(CASE WHEN mm.service_grade_code = 'E01' THEN 1 ELSE 0 END) e01, | |
| 100 * ROUND(CASE WHEN SUM(1) = 0 THEN 0 ELSE SUM(CASE WHEN mm.service_grade_code = 'E01' THEN 1 ELSE 0 END) / CAST(SUM(1) AS FLOAT) END, 4) e01_percentage, | |
| -- ... lots more service grade codes here | |
| SUM(CASE WHEN mm.service_grade_code = 'W05' THEN 1 ELSE 0 END) w05, | |
| 100 * ROUND(CASE WHEN SUM(1) = 0 THEN 0 ELSE SUM(CASE WHEN mm.service_grade_code = 'W05' THEN 1 ELSE 0 END) / CAST(SUM(1) AS FLOAT) END, 4) w05_percentage, | |
| SUM(CASE WHEN mm.service_grade_code NOT IN ('E01','E02','E03','E04','E05','E06','E07','E08','E09','O01','O02','O03','O04','O05','O06','O07','O08','O09','W01','W02','W03','W04','W05') OR mm.service_grade_code IS NULL THEN 1 ELSE 0 END) unknown, | |
| 100 * ROUND( | |
| CASE WHEN SUM(1) = 0 THEN |
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
| <Location /> | |
| AuthType Basic | |
| AuthName "Fabulous Demo" | |
| AuthUserFile /path/to/htaccess/file | |
| Require valid-user | |
| </Location> |
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
| flash[:notice] = render_to_string(:partial => 'foo_deleted') |
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
| fetchmail -d 300 --smtpname [email protected] -p POP3 -u dburger 172.16.100.7 |
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
| #!/bin/sh | |
| route del -net 172.16.100.0 netmask 255.255.255.0 dev ppp0 |