Skip to content

Instantly share code, notes, and snippets.

🛠
Building neat products

Jeffrey Horn jrhorn424

🛠
Building neat products
Block or report user

Report or block jrhorn424

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jrhorn424
jrhorn424 / .npmrc
Last active Jun 21, 2018
Sane .npmrc
View .npmrc
package-lock=true
cache=node_cache # add ./node-cache to .gitignore
save=true
save-exact=true
# save-prefix='~'
@jrhorn424
jrhorn424 / GIF-Screencast-OSX.md
Created Feb 26, 2017 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jrhorn424
jrhorn424 / controllers.application.js
Created Nov 1, 2016
ownProperties in Ember Objects
View controllers.application.js
import Ember from 'ember';
const Person = Ember.Object.extend({
greeting: 'yo',
say (thing) {
return `${thing}`;
},
say2 (thing) {
View bettermotherfuckingstyles.css
body {
margin: 40px auto;
max-width: 650px;
line-height: 1.6;
font-size: 18px;
color: #444;
padding: 0 10px
}
h1,
@jrhorn424
jrhorn424 / attempting_to_curl.md
Last active Nov 10, 2015 — forked from jcmeyer10/gist:ccddcc239676d58094dd
Commands and Error Messages When Trying to POST to my table through CURL
View attempting_to_curl.md

I am trying to run this. I am able to post to the table through Rails C, so I have access from there.

curl --request POST --header "Authorization: Token token="d168c8333a2b72bf7ad7bfe4bb9c669d" --header "Content-Type: application/json" -d '{
  "beer": {
    "name":"UFO"
    "brewery":"Harpoon"
    "style":"Hefe"
    "location_id":"11"
  }
View counter.js
//Verison 0
'use strict';
var counterFactory = function counterFactory() {
return function() {};
};
var firstCounter = counterFactory();
// firstCounter contains a reference to
// a new instance of the minimal function
View age.js
var age = function age() {
var dob = new Date(this.dob);
var today = new Date();
var thisYear = today.getFullYear();
if (dob.getMonth() > today.getMonth() ||
dob.getMonth() === today.getMonth() &&
dob.getDate() >= today.getDate()) {
thisYear -= 1;
}
View vimdiff.md

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)
:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)
@jrhorn424
jrhorn424 / nand
Created Apr 24, 2015
NAND is the root of all elementary logic.
View nand
NAND
====
| x | y | NAND |
| - | - | ---- |
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
View langoliers.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'twitter'
require 'json'
require 'faraday'
# things you must configure
PATH_TO_DROPBOX = "/Users/your_name/Dropbox/backup/tweets/" # you need to create this folder
TWITTER_USER = "your_twitter_username"
You can’t perform that action at this time.