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
#!/usr/bin/env python3 | |
import requests # for getting URL | |
import json # for parsing json | |
from datetime import datetime # datetime parsing | |
import pytz # timezone adjusting | |
import csv # for making csv files | |
import os | |
################################################################# |
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
<?php | |
function validate_company_id($company_id) { | |
// Some old company id's have only 6 digits. They should be prefixed with 0. | |
if (preg_match("/^[0-9]{6}\\-[0-9]{1}/", $company_id)) { | |
$company_id = '0' . $company_id; | |
} | |
// Ensure that the company ID is entered in correct format. | |
if (!preg_match("/^[0-9]{7}\\-[0-9]{1}/", $company_id)) { |
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
$hash = @{}; $list = cat .gitmodules | where { $_ -like "*=*" } | foreach { $_.Split("=")[1].Trim() }; while ($list) { $key, $value, $list = $list; $hash[$key]=$value }; $hash.GetEnumerator() | foreach { & git submodule add $_.Value $_.Name } |
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
namespace :mongo do | |
def confirm(message) | |
print "\n#{message}\nAre you sure? [y/n] " | |
# STDIN is not supported on heroku :/ | |
raise 'Aborted' unless STDIN.gets.chomp == 'y' | |
end | |
desc "gets database" | |
task :db => :environment do |