Skip to content

Instantly share code, notes, and snippets.

@joshleichtung
joshleichtung / gist:901435fe54b24698022ccc6e93cb2332
Last active February 24, 2018 02:07
How to make a gist and use markup

Getting Started

Basics of Markdown

  • To make a header, start your line with a "#"
  • To make smaller headers, h2, h3, etc... just repeat that character - eg "##"
  • To make a bulleted list, start the line with a "*"
  • To make a link put the text you want to display in [] and put the url in ()
  • Add an image with ![alt-text](http://image-url.com)
files: # this is set up for where to create the new file from the .ebextensions during environment setup
"/etc/nginx/conf.d/01_webapp.conf":
mode: "000644"
owner: root
group: root
content: | # Copy the contents of your original /etc/nginx/conf.d/webapp.conf file below.
# Comments are provided where changes or additions are required
upstream app_name { # the name can be anything other than my_app, which is used in the default webapp.conf file
server unix:///var/run/puma/my_app.sock;
}
@joshleichtung
joshleichtung / Podfile
Created October 29, 2017 22:06
Sample podfile for react-native-maps
# You Podfile should look similar to this file. React Native currently does not support use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
# Change 'AirMapsExplorer' to match the target in your Xcode project.
target 'make_maps_work' do
rn_path = '../node_modules/react-native'
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/Yoga.podspec"
@joshleichtung
joshleichtung / numberToWords.js
Created October 20, 2017 20:30
Number to word Conversion
// This is the text editor interface.
// Anything you type or change here will be seen by the other person in real time.
// Given a number 3141592654, write a code to translate this to Three Billion One Hundred Forty One Million Five Hundred Ninety Two Thousand Six Hundred Fifty Four. Your code should be able to translate any given number where 0 < number <= 9,999,999,999.
const numberConversion = {
1000000000: "Billion",
1000000: "Million",
1000: "Thousand",
100: "Hundred",
90: "Ninety",