Skip to content

Instantly share code, notes, and snippets.

View rydurham's full-sized avatar

Ryan Durham rydurham

View GitHub Profile
{
"key": "ctrl+alt+w",
"command": "workbench.action.closeAllEditors"
},
{
"key": "ctrl+alt+q",
"command": "workbench.files.action.collapseExplorerFolders"
},
{
"key": "ctrl+shift+t",
@rydurham
rydurham / .php_cs
Last active May 1, 2019 02:47
Laravel PHP CS config
<?php
$finder = Symfony\Component\Finder\Finder::create()
->exclude('vendor')
->exclude('bootstrap')
->exclude('storage')
->in(__DIR__)
->name('*.php')
->notName('*.blade.php');
@rydurham
rydurham / .bashrc
Last active April 15, 2019 21:31
bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
$ php --version
PHP 7.0.28-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.28-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
$ php -m
[PHP Modules]
<input v-el="avatar" type="file" name="avatar" id="avatar" v-on="change:upload">
methods: {
upload: function(e) {
e.preventDefault();
var files = this.$$.avatar.files;
var data = new FormData();
// for single file
data.append('avatar', files[0]);
// Or for multiple files you can also do
// _.each(files, function(v, k){
@rydurham
rydurham / st3setup.txt
Last active May 10, 2017 14:34
Sublime Text Configuration Notes
Sublime Text Configuration Notes
1. Install Package Control
ctrl + `
import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
2. Install SidebarEnhancements
@rydurham
rydurham / Preferences.sublime-settings
Created April 29, 2017 21:10
Sublime Text Config
{
"added_words":
[
"Laravel"
],
"binary_file_patterns":
[
"*.dds",
"*.eot",
"*.gif",
private function parseSenderEmail($body)
{
$start = strpos($body, '<');
// Make sure we have a valid starting point
if ($start === false) {
// This is not a properly formatted message
return '';
}
@rydurham
rydurham / gist:7149861
Created October 25, 2013 05:37
.bash_aliases 10/24/13
# Some useful Aliases
alias cls=clear
alias composer='/usr/local/bin/composer.phar'
# Add Git Branch Info
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}