Skip to content

Instantly share code, notes, and snippets.

@BenGitsCode
BenGitsCode / gist:a6993ad84edddd1b4c7111ed0d1b3c6b
Created February 7, 2017 19:31 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@BenGitsCode
BenGitsCode / filter-forEach-chaining.js
Created February 7, 2017 19:50
Chaining array methods (filter and forEach)
let someArray = [1,2,3,4,5];
someArray
.filter(num => {
if(num % 2 === 0) {
return num;
}
})
.forEach(evnNum => {
//do something cool
// push to an array or something
@BenGitsCode
BenGitsCode / ruby-review.rb
Last active February 7, 2017 21:11
Ruby basics review code
# Stores can sell things
class Store
def sell
'You bought the thing!'
end
end
# contains methods common to hot drinks
module HotDrink
# this defines an instance method make_hot_drink
@BenGitsCode
BenGitsCode / es6-epic-logging.js
Created February 8, 2017 17:11
Great way to log objects with <the thing is: the thing>
`console.log({min});`
// it will output with the variable name like this `Object {min: 46}`
@BenGitsCode
BenGitsCode / .gitconfig-for-diffmerge
Created February 16, 2017 15:16 — forked from YanhaoYang/.gitconfig-for-diffmerge
Using DiffMerge as your Git visual merge and diff tool on Mac
[diff]
tool = diffmerge
[difftool "diffmerge"]
cmd = diffmerge \"$LOCAL\" \"$REMOTE\"
[merge]
tool = diffmerge
[mergetool "diffmerge"]
cmd = "diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$(if test -f \"$BASE\"; then echo \"$BASE\"; else echo \"$LOCAL\"; fi)\" \"$REMOTE\""
trustExitCode = true
@BenGitsCode
BenGitsCode / DiffMergeToolconfig.gitconfig
Last active February 17, 2017 01:06
Ben's Git Snippets and such
# DiffMerge diff and merge tools
[diff]
tool = diffmerge
[difftool "diffmerge"]
cmd = diffmerge \"$LOCAL\" \"$REMOTE\"
[merge]
tool = diffmerge
[mergetool "diffmerge"]
cmd = "diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$(if test -f \"$BASE\"; then echo \"$BASE\"; else echo \"$LOCAL\"; fi)\" \"$REMOTE\""
trustExitCode = true
@BenGitsCode
BenGitsCode / sublime-text-3-setup.md
Created February 27, 2017 17:14 — forked from ijy/sublime-text-3-setup.md
My Sublime Text 3 setup.

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following:
@BenGitsCode
BenGitsCode / protips.js
Created February 28, 2017 16:49 — forked from nolanlawson/protips.js
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
import Ember from 'ember';
export default Ember.Route.extend({
model(/*params*/) { // or model: function() { }
return retrieveModel(); // return your model
}
// model() referred to as `model hook` because it's a specific method invoked
// by the Ember framework every time it needs to handle a web request.
@BenGitsCode
BenGitsCode / gist:3a8146e1eb51082791631e0075795145
Created March 14, 2017 13:05 — forked from while0pass/listchars.vim
show/hide hidden characters in Vim
" show hidden characters in Vim
:set list
" settings for hidden chars
" what particular chars they are displayed with
:set lcs=tab:▒░,trail:▓
" or
:set listchars=tab:▒░,trail:▓
" used \u2592\u2591 for tab and \u2593 for trailing spaces in line.
" In Vim help they suggest using ">-" for tab and "-" for trail.