Skip to content

Instantly share code, notes, and snippets.

View nicekiwi's full-sized avatar
🍳
Living brunch to brunch.

Ezra nicekiwi

🍳
Living brunch to brunch.
View GitHub Profile
@nicekiwi
nicekiwi / album.php
Created October 22, 2012 10:47
presenter photos thing
<?php // my view ?>
<h1><?php echo $album_info['0']['album_name'] ?></h1>
<a href="/photos/<?php echo $album_info['0']['album_year'] ?>" title="Back to Albums">Back to Albums</a>
<ul class="photo-items">
<?php foreach($album_photos as $k => $v) {$album_photos[$k] = (object) $v;} ?>
<?php $album_presenter->partial('list_photos'); ?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SPConnectionFavorites</key>
<array>
<dict>
<key>database</key>
<string></string>
<key>host</key>
@nicekiwi
nicekiwi / bash_aliases
Created December 26, 2013 03:35
Basic Bash Aliases
alias nginx.start='sudo launchctl load ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist'
alias nginx.stop='sudo launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist'
alias nginx.restart='nginx.stop && nginx.start'
alias php-fpm.start="launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist"
alias php-fpm.stop="launchctl unload -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist"
alias php-fpm.restart='php-fpm.stop && php-fpm.start'
alias mysql.start="launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist"
alias mysql.stop="launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist"
alias mysql.restart='mysql.stop && mysql.start'
@nicekiwi
nicekiwi / bash_aliases
Last active January 1, 2016 10:29 — forked from frdmn/bash_aliases
Customised
alias nginx.start='sudo launchctl load ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist'
alias nginx.stop='sudo launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist'
alias nginx.restart='nginx.stop && nginx.start'
alias php-fpm.start="launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist"
alias php-fpm.stop="launchctl unload -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist"
alias php-fpm.restart='php-fpm.stop && php-fpm.start'
alias mysql.start="launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist"
alias mysql.stop="launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist"
alias mysql.restart='mysql.stop && mysql.start'
// include gulp
var gulp = require('gulp');
// include plug-ins
var jshint = require('gulp-jshint'),
stripDebug = require('gulp-strip-debug'),
uglify = require('gulp-uglify'),
autoprefix = require('gulp-autoprefixer'),
minifyCSS = require('gulp-minify-css'),
rename = require('gulp-rename'),
@nicekiwi
nicekiwi / .bashrc
Created February 13, 2015 05:57
ssh-agent
# Note: ~/.ssh/environment should not be used, as it
# already has a different purpose in SSH.
env=~/.ssh/agent.env
# Note: Don't bother checking SSH_AGENT_PID. It's not used
# by SSH itself, and it might even be incorrect
# (for example, when using agent-forwarding over SSH).
agent_is_running() {
<?php
require_once 'vendor/autoload.php';
$opts = [
'calendar-id' => 're2h5k3qcl80edoihv27bn6i3c@group.calendar.google.com',
'client-email' => 'xxxxxxxxxxxxxxxxxxxxx',
'private-key' => file_get_contents('auth-key.p12'),
'scopes' => [
'https://www.googleapis.com/auth/calendar'
<?php
interface Animal {
public function communitcate();
}
abstract class Boat {
@nicekiwi
nicekiwi / gist:b09965135a30736f600c
Created May 20, 2015 05:56
Pass button data to modal
var lastClickedEl;
$('button').on('click', function() {
lastClickedEl = $(this);
});
$('modal').on('shown.bs.modal', function(){
var userId = lastClickedEl.attr('data-user_id');
..
@nicekiwi
nicekiwi / example-queue.conf
Created May 28, 2015 04:29
Supervisor Laravel Queue Example
[program:example-queue]
command=php artisan queue:work --queue=exmaple --tries=2 --daemon
directory=/var/www/example
stdout_logfile=/var/www/example/app/storage/logs/supervisor.log
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=10
stdout_capture_maxbytes=0
stdout_events_enabled=false
// use 2 workers