Skip to content

Instantly share code, notes, and snippets.

View scottwarren's full-sized avatar

Scott Warren scottwarren

View GitHub Profile
@scottwarren
scottwarren / example_file.js
Created August 4, 2019 11:00
Cool description
export default function getFullName(firstName, lastName) {
return `${firstName} ${lastName}`
}
@scottwarren
scottwarren / 0_reuse_code.js
Last active August 31, 2015 03:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@scottwarren
scottwarren / var_dump.sublime-snippet
Created April 29, 2015 01:13
Sublime Snippet for var_dump(); die; "debugging" for PHP
<snippet>
<content><![CDATA[
var_dump($1);
die;
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>var_dump</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
</snippet>
@scottwarren
scottwarren / merge-base.sh
Last active August 29, 2015 14:19
Merge the main development branch into your feature branch
##
# merges a branch into current branch to keep up to date with the base (default master)
# usage: be-merge [branch]
# Make sure you are on the right branch before you run this command
#
function merge-base() {
git checkout ${1-master}
git pull
git checkout -
git merge ${1-master}
@scottwarren
scottwarren / todo.md
Last active August 29, 2015 14:17
todo
  • phpstorm
  • sublime
  • mutate
  • Printer
  • Vagrant box
  • Macbuntu
  • ZSH Plugins (oh my sh)
  • [ ]
@scottwarren
scottwarren / pigLatin.js
Created December 31, 2014 02:31
Convert an English word into Pig Latin written in Javascript
function pigLatin(englishWord) {
return englishWord.substr(1, englishWord.length) + englishWord.substr(0, 1) + 'ay';
};
// example: console.log(pigLatin('Hello'));
@scottwarren
scottwarren / list.md
Last active August 29, 2015 13:57
Helpful HTML/CSS Snippets
2014-02-14 00:20:44,222 INFO [sessionId=] [requestId=] [main]: Version - Hibernate Commons Annotations 3.2.0.Final
2014-02-14 00:20:44,227 INFO [sessionId=] [requestId=] [main]: Environment - Hibernate 3.6.0.Final
2014-02-14 00:20:44,229 INFO [sessionId=] [requestId=] [main]: Environment - hibernate.properties not found
2014-02-14 00:20:44,231 INFO [sessionId=] [requestId=] [main]: Environment - Bytecode provider name : javassist
2014-02-14 00:20:44,236 INFO [sessionId=] [requestId=] [main]: Environment - using JDK 1.4 java.sql.Timestamp handling
2014-02-14 00:20:44,288 INFO [sessionId=] [requestId=] [main]: Version - Hibernate EntityManager 3.6.0.Final
2014-02-14 00:20:44,301 INFO [sessionId=] [requestId=] [main]: Ejb3Configuration - Processing PersistenceUnitInfo [
name: persistenceUnit
...]
2014-02-14 00:20:44,649 INFO [sessionId=] [requestId=] [main]: AnnotationBinder - Binding entity from annotated class: net.flitech.altitude.cobra.model.jpa.Interface
@scottwarren
scottwarren / yolo.swag.js
Last active August 29, 2015 13:56
example of .call method
var model = {
departureLocation: {
port: 'Some Port',
city: 'Tokyo',
country: 'Japan'
},
arrivalLocation: {
post: 'Main Port',
city: 'Seattle',
country: 'United States'
@scottwarren
scottwarren / gist:8913568
Created February 10, 2014 10:26
simple "package" of all required files for: https://www.github.com/michael/github/
// Underscore.js 1.4.2
// http://underscorejs.org
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore may be freely distributed under the MIT license.
(function(){var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,s=Function.prototype,o=r.push,u=r.slice,a=r.concat,f=r.unshift,l=i.toString,c=i.hasOwnProperty,h=r.forEach,p=r.map,d=r.reduce,v=r.reduceRight,m=r.filter,g=r.every,y=r.some,b=r.indexOf,w=r.lastIndexOf,E=Array.isArray,S=Object.keys,x=s.bind,T=function(e){if(e instanceof T)return e;if(!(this instanceof T))return new T(e);this._wrapped=e};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=T),exports._=T):e._=T,T.VERSION="1.4.2";var N=T.each=T.forEach=function(e,t,r){if(e==null)return;if(h&&e.forEach===h)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,s=e.length;i<s;i++)if(t.call(r,e[i],i,e)===n)return}else for(var o in e)if(T.has(e,o)&&t.call(r,e[o],o,e)===n)return};T.map=T.collect=function(e,t,n){var r=[];retu