Skip to content

Instantly share code, notes, and snippets.

Jordan tenfef

Block or report user

Report or block tenfef

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View oldcalender.js
/**
* @preserve
* FullCalendar v1.5
* http://arshaw.com/fullcalendar/
*
* Use fullcalendar.css for basic styling.
* For event drag & drop, requires jQuery UI draggable.
* For event resizing, requires jQuery UI resizable.
*
* Copyright (c) 2011 Adam Shaw
View deploy.sh
#!/bin/bash
# Fergus Staging Deploy Script
# Update git to staging
cd /var/www/fergus_internal_demo;
#!/bin/bash
function bgtext {
echo -e $(tput setab 24)" $1"$(tput sgr0);
View Collection::group_by().php
<?php
public static function group_by(Array $objects, $group_by_property)
{
$grouped_objects = [];
foreach($objects as $object)
{
$property_value = $object->{$group_by_property};
if (! isset($grouped_objects[$property_value]))
{
View gist:6720834
<ul class="nav nav-list">
<? if ($new_job): ?>
<div id='choose_job_type' class='choose_job_type_cont validation_container'>
<h3>Project Type</h3>
<? foreach($job_type_list as $job_type): ?>
<? if ($job_type->job_type_name == 'Draft') continue; ?>
<a class="btn btn-info choose_job_type <?= ($job_type->job_type_name == $job->job_type_name) ? 'active' : '' ?>" data-job_type="<?=$job_type->id?>"><?=$job_type->job_type_name?></a>
<? endforeach; ?>
</div>
View gist:5375523
<?php
// output all thursdays between $start and $end
$periodInterval = \DateInterval::createFromDateString('first thursday');
$periodIterator = new \DatePeriod($start, $periodInterval, $end, \DatePeriod::EXCLUDE_START_DATE);
foreach ($periodIterator as $date) {
// output each date in the period
echo $date->format('m/d/Y') . ' ';
}
View gist:4601833
<?
$github_ips = array('207.97.227.253', '50.57.128.197', '108.171.174.178', '50.57.231.61', '121.99.59.84');
if(! in_array($_SERVER['REMOTE_ADDR'], $github_ips)) {
header('HTTP/1.1 404 Not Found');
echo '<h1>404 Not Found.</h1>';
exit;
}
if (! isset($_POST['payload'])) {
View gist:3972658
<?php
while ($person_is_at_groceries == TRUE){
buy_some_eggs();
}
?>
View gist:2816103
<link rel="stylesheet" href="http://fergusapp.com/pdfjs/viewer.css">
<div id="controls">
<button id="previous" onclick="PDFView.page--;" oncontextmenu="return false;">
<img src="http://fergusapp.com/pdfjs/images/go-up.svg" align="top" height="16"/>
Previous
</button>
<button id="next" onclick="PDFView.page++;" oncontextmenu="return false;">
<img src="http://fergusapp.com/pdfjs/images/go-down.svg" align="top" height="16"/>
View gist:1952654
<?
number_format((($hour_totals->charged_total * $employee->charge_out_rate - $hour_totals->paid_total * $employee->pay_rate) / $hour_totals->paid_total * $employee->pay_rate) * 100, 1);
You can’t perform that action at this time.