Skip to content

Instantly share code, notes, and snippets.

View nicksarafa's full-sized avatar
😄

Nick Sarafa nicksarafa

😄
  • Los Angeles
View GitHub Profile
@nicksarafa
nicksarafa / parse_aws.md
Created March 9, 2016 13:02 — forked from hassy/parse_aws.md
Deploying Parse Server on AWS (WIP)

Deploying Parse Server on AWS

Note: this is a work-in-progress and will be updated with more information over the next few days.

Intro

This guide will walk you through deploying your own instance of the open-source Parse Server. This would be a good starting point for testing your existing application to see if the functionality provided by the server is enough for your application, and to potentially plan your migration off the Parse Platform.

This guide will walk you through using Elastic Beanstalk (EB), which is an AWS service similar to Heroku. Why use EB rather than Heroku? Elastic Beanstalk does not lock you into Heroku-specific ways of doing things, is likely cheaper to run your backend on than Heroku, and it integrates with other services that AWS offer (and they offer almost everything one needs to run an application these days).

@nicksarafa
nicksarafa / _golden-ratio.scss
Created July 16, 2016 00:54 — forked from gregrickaby/_golden-ratio.scss
Golden Ratio Typography for Sass
//
// Golden Ratio Typography
// --------------------------------------------------
// Golden Ratio Math
//
// Let's do some math so we can build beautiful typography and vertical rhythm.
// For any magic to happen, set the $ContentWidth variable on _variables.scss
// to match your content box width (normally this is 640px, 740px, etc...).
@nicksarafa
nicksarafa / fibonacci-lookup.js
Created November 3, 2016 19:04 — forked from ericelliott/fibonacci-lookup.js
A lookup table implementation of the Fibonacci generator in JavaScript.
const lookup = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610,
987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393,
196418, 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887, 9227465,
14930352, 24157817, 39088169, 63245986, 102334155, 165580141, 267914296,
433494437, 701408733, 1134903170, 1836311903, 2971215073, 4807526976,
7778742049, 12586269025, 20365011074, 32951280099, 53316291173, 86267571272,
139583862445, 225851433717, 365435296162, 591286729879, 956722026041,
1548008755920, 2504730781961, 4052739537881, 6557470319842, 10610209857723,
17167680177565, 27777890035288, 44945570212853, 72723460248141,
117669030460994, 190392490709135, 308061521170129, 498454011879264,
@nicksarafa
nicksarafa / nstime.js
Created November 3, 2016 19:47 — forked from ericelliott/nstime.js
Convert Node's process.hrtime() return values to nanoseconds
const nsTime = (hrtime) => hrtime[0] * 1e9 + hrtime[1];
@nicksarafa
nicksarafa / GIF-Screencast-OSX.md
Created May 11, 2017 00:08 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

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:

@nicksarafa
nicksarafa / docker-log.sh
Created May 27, 2017 21:48 — forked from yarcowang/docker-log.sh
simple bash script to show log for a docker image
#!/usr/bin/env bash
DOCKER=`which docker`
usage()
{
echo "Usage: $(basename $0) [-l num] IMAGE"
exit 0
}

Vimium Cheatsheet

/ - enter find mode

F - activate link hints mode to open in new tab

G - scroll to bottom of the page

J - go one tab left

@nicksarafa
nicksarafa / .vimrc
Last active January 8, 2018 06:50 — forked from joegoggins/.vimrc
Mac Vim .vimrc file
" ================ Git Time Tracking ================
" ================ @see https://github.com/git-time-metric/gtm-vim-plugin ================
let g:gtm_plugin_status_enabled = 1
" ================ Pathogen Init ====================
execute pathogen#infect()
syntax on
filetype plugin indent on
@nicksarafa
nicksarafa / export_repo_issues_to_csv.py
Created June 6, 2017 17:36 — forked from unbracketed/export_repo_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests
@nicksarafa
nicksarafa / function_invocation.js
Created June 19, 2017 01:55 — forked from myshov/function_invocation.js
11 Ways to Invoke a Function
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);