Skip to content

Instantly share code, notes, and snippets.

@andizzle
andizzle / config.go
Last active September 28, 2017 00:14
package kernel
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"strings"
public function getMediaAttribute($value) {
if (!array_key_exists('media', $this->attributes)) {
$baseURL = Config::get('image.cloudinary.base_url');
$presets = Config::get('image.cloudinary.presets');
$originalContent = $context = $this->attributes['content'];
switch ($this->type) {
case MessagePost::TYPE_PDF:
$context = 'pdf_icon';
$thumbPreset = array_get($presets, 'pdf');
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
<?php
class Entry {
protected $name;
protected $start;
protected $end;
protected $duration;
public function __construct($name, $start, $end) {
$this->name = $name;
https://gist.github.com/2d42ed9c76599286c507076dde7ca103
<FilesMatch "^apple-app-site-association$">
<ifModule mod_headers.c>
Header set Content-type "application/json"
</ifModule>
</FilesMatch>
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `p_get_user_rgby_day`( in I_userId varchar(255)
, in I_startDate date
, in I_endDate date
)
thisProc:BEGIN #1.001
declare L_dropTempTables tinyint default true;
## params
declare L_userID varchar(255) default '';
declare L_startDate date;
select * from `shifts` where `shifts`.`id` = '1fa870fa-96aa-458d-b2e9-34528cc1dbe1' limit 1;
select * from `addresses` where `addresses`.`id` in ('69dd98c9-2131-40b5-978c-2e2904a33b85');
select count(*) as aggregate from `shift_interactions` where `shift_id` = '1fa870fa-96aa-458d-b2e9-34528cc1dbe1' and `id` = '51a4251d-4f10-40d8-9836-ba7df56b32f2' and `applicant_entity_id` = '6d8c6b4e-610d-492a-aa51-9b7fbeef13ec' limit 1;
select `v_users`.*, `shift_interactions`.`shift_id` as `pivot_shift_id`, `shift_interactions`.`applicant_entity_id` as `pivot_applicant_entity_id`, `shift_interactions`.`interaction_status` as `pivot_interaction_status`, `shift_interactions`.`id` as `pivot_id`, `shift_interactions`.`context_type` as `pivot_context_type`, `shift_interactions`.`swap_shift_id` as `pivot_swap_shift_id` from `v_users` inner join `shift_interactions` on `v_users`.`id` = `shift_interactions`.`applicant_entity_id` where `shift_interactions`.`shift_id` = '1fa870fa-96aa-458d-b2e9-34528cc1dbe1' and `shift_interactions`
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `pV_company_shifts`( in I_companyId varchar(255)
, in I_startDateTime datetime
, in I_endDateTime datetime
, in I_status varchar(255)
, in I_published varchar(255)
, in I_minDate datetime
)
thisProc:BEGIN #1.001
declare L_thisProc varchar(20) default 'pVwCoShfts';