Skip to content

Instantly share code, notes, and snippets.

View codyphobe's full-sized avatar
🏍️
Chasing the sunset

Cody codyphobe

🏍️
Chasing the sunset
View GitHub Profile
@steveneaston
steveneaston / gist:73d623549a2c414f2789
Created June 26, 2015 22:26
Initialise properties Sublime macro
{
"keys": ["super+i"],
"command": "run_macro_file",
"args": {"file": "Packages/User/Macros/initialize_properties.sublime-macro"},
"context": [{"key": "selector", "operator": "equal", "operand": "source.php"}]
}
@dwightwatson
dwightwatson / NullingTrait.php
Created June 18, 2015 05:57
NullingTrait.php
<?php namespace App\Support;
trait NullingTrait
{
/**
* Boot the trait. Adds an observer class for nulling.
*
* @return void
*/
public static function bootNullingTrait()
@timdorr
timdorr / .gitconfig
Created January 26, 2016 15:57
.gitconfig aliases
[alias]
st = status -sb
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
up = !git fetch origin && git rebase origin/master
mup = !git fetch origin && git merge origin/master
done = "!git checkout master && git pull && git fetch -p && git branch --merged | grep -Pv '\\*|master' | xargs -n 1 git branch -d"
@derFunk
derFunk / floatsign.sh
Last active June 3, 2016 01:44 — forked from mediabounds/floatsign.sh
Allow for different keychain usage and allow for resigning with Xcode > 6 (removed --resource-rules parameter)
# !/bin/bash
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
<template>
<div class="form-group" :class="errorClass">
<label :for="slug">{{ title }}</label>
<textarea class="form-control" :id="slug" v-model="model" v-if="isTextarea" v-bind="attrs"></textarea>
<input :type="type" class="form-control" :id="slug" v-model="model" v-if="isInput" v-bind="attrs">
<select class="form-control" :id="slug" v-model="model" v-if="isSelect" v-bind="attrs">
<option :value="option" v-for="option in options">{{ option }}</option>
</select>
<span class="help-block" v-show="errors" v-text="errorText"></span>
</div>
@jarektkaczyk
jarektkaczyk / laravel-tinker-RouteList-helper.php
Created September 8, 2016 02:49
Handy helper for working with route list in tinker [Laravel]
<?php
// Easily get route list in tinker
>>> app('RouteList')->setOption('method', 'PUT')->getRoutes()
>>> app('RouteList')->getRoutes()->where('name', 'website.login')
class RouteList extends \Illuminate\Foundation\Console\RouteListCommand
{
/** @var array */
@deefour
deefour / deefour-request-handling.md
Last active November 11, 2016 19:22
A work-in-progress attempt to explain how a few small packages aide me in application development.

NOTE: Some recent, major refactoring has made some sections of this document inaccurate. It will be updated soon.

Handling Requests in Laravel With the Help of Ruby-Inspired Packages

I am a PHP developer that has done a lot of Ruby on Rails development over the last few years. There are a few gems I found especially useful again and again.

<?php
//yikes
class ArrayArrayObject extends ArrayObject
{
public function offsetSet($index, $value)
{
array_map(function ($k) use ($value) {
parent::offsetSet($k, $value);
}, (array)$index);
@wesbos
wesbos / you-are-welcome.sh
Last active March 28, 2017 13:36
Listen to all the voices inside your Mac computer
# paste this into your console and hit enter
for voice in Agnes Kathy Princess Vicki Victoria Alex Bruce Fred Junior Ralph Albert Bad News Bahh Bells Boing Bubbles Cellos Deranged Good News Hysterical Pipe Organ Trinoids Whisper Zarvox; do say "Hi `whoami` my name is ${voice}" -v ${voice}; done
@taylorotwell
taylorotwell / alert.php
Created November 11, 2016 22:39
Components And Slots
<div class="alert">
{{ $slot }}
</div>