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
// models/contracts.js | |
import Ember from 'ember'; | |
var Contracts = Ember.Namepsace.extend({}); | |
export default Contracts; |
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
// app/store.js | |
import DS from 'ember-data'; | |
export default DS.Store.extend({ | |
init: function() { | |
console.log('Using custom store!'); | |
// console.log(this); | |
return this._super.apply(this, arguments); | |
}, |
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
#!/bin/bash | |
# | |
#Stage/Live MongoDB Dump & Population Script | |
#Version 0.2 10/22/2012 | |
#Written by Adam Whitlock | |
### Variables ### | |
#mongodump variables | |
DBNAME="merrick" |
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
<?php | |
ini_set('memory_limit', -1); | |
set_time_limit(0); | |
/** | |
* | |
*/ | |
class Export { |
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
#!/bin/bash | |
limit=5000 | |
counter=0 | |
while [ $counter -lt $limit ]; do | |
image=$(head -n 1 images.txt) | |
echo "$(tail -n +2 images.txt)" > images.txt |
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
#!/bin/bash | |
# Usage: ./fix_endings.sh fileName | |
# Example: ./fix_endings.sh nfn.1.csv | |
file=$1 | |
limit=$(wc -l < "$file") | |
counter=1 | |
# set -x |
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
<?php | |
// Print out site header information | |
echo '<html><head><title>Knights of Columbus Calendar</title><link rel="stylesheet" type="text/css" href="kofccalendar.css"></head><body>'; | |
$cy = isset($_GET['cy']) ? (int) $_GET['cy'] : 0; // See if year is defined ( view month other than current) | |
$cm = isset($_GET['cm']) ? (int) $_GET['cm'] : 0; // See if month is defined ( view month other than current) | |
if($cy == 0) { $cy = date('Y'); } |
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
<?php | |
// .. | |
$start = time(); | |
$jobs = array('processed' => array()); | |
// For one minute, iterate over available jobs and run them. | |
while (time() > $start + 60) { | |
$query = sprintf('SELECT * FROM job WHERE status = 1 AND priority = "%s" AND (type = "onetime" OR (type = "reoccuring" AND (start is null OR NOW() >= start) AND (stop is null or NOW() < stop) AND NOW() >= DATE_ADD(last_started, INTERVAL `interval` MINUTE))) LIMIT 1;', (int) $priority); | |
fbl($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
#!/bin/bash | |
# | |
# Usage: ./cpimages.sh oldPath newPath | |
# Example: ./cpimages.sh /data/media/files/cygnus/KBDN/image /data/media/files/base/sola/kbdn/image | |
# | |
mediaPath=$1 | |
newPath=$2 | |
#set -x | |
cd $mediaPath |
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
<?php | |
namespace Cygnus\BaseBundle\Composer; | |
use Composer\Script\Event; | |
use Sensio\Bundle\GeneratorBundle\Manipulator\KernelManipulator; | |
class ScriptHandler | |
{ |