Skip to content

Instantly share code, notes, and snippets.

View rydurham's full-sized avatar

Ryan Durham rydurham

View GitHub Profile
@rydurham
rydurham / vimrc
Last active August 29, 2015 14:13 — forked from r00k/vimrc
" A minimal vimrc for new vim users to start with.
"
" Referenced here: http://www.benorenstein.com/blog/your-first-vimrc-should-be-nearly-empty/
" Original Author: Bram Moolenaar <Bram@vim.org>
" Made more minimal by: Ben Orenstein
" Last change: 2012 Jan 20
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
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 '';
}
<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 / Preferences.sublime-settings
Created April 29, 2017 21:10
Sublime Text Config
{
"added_words":
[
"Laravel"
],
"binary_file_patterns":
[
"*.dds",
"*.eot",
"*.gif",
@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 / provisioning.sh
Last active February 9, 2021 16:38
Ubuntu Provisioning
# /home partition
# https://help.ubuntu.com/community/Partitioning/Home/Moving
# Basics
sudo apt update
sudo apt install curl vim git libpng-dev
sudo apt remove apache2
# Remove snapd
# https://askubuntu.com/questions/1035915/how-to-remove-snap-store-from-ubuntu
$ 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]
@rydurham
rydurham / Model.php
Last active August 11, 2020 18:43
Eloquent Model Stub
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Flight extends Model
{
/**
* The table associated with the model.