- Create a gist if you haven't already.
- Clone your gist:
# make sure to replace `<hash>` with your gist's hash git clone https://gist.github.com/<hash>.git # with https git clone [email protected]:<hash>.git # or with ssh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CLI | |
| sudo apt update -y | |
| sudo apt install -y \ | |
| git curl btop \ | |
| docker.io docker-buildx \ | |
| build-essential pkg-config autoconf bison rustc cargo clang \ | |
| libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \ | |
| libvips imagemagick libmagickwand-dev mupdf mupdf-tools \ | |
| redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \ | |
| rbenv apache2-utils |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class DummyController < ApplicationController | |
| def do | |
| render json: { balance: 50 } | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| files: | |
| # If this file is edited, it must be removed from EC2 instance prior to deploy. | |
| "/opt/elasticbeanstalk/hooks/appdeploy/pre/09_yarn_install.sh" : | |
| mode: "000775" | |
| owner: root | |
| group: users | |
| content: | | |
| #!/usr/bin/env bash | |
| set -xe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function iframeURLChange(iframe, callback) { | |
| var lastDispatched = null; | |
| var dispatchChange = function () { | |
| var newHref = iframe.contentWindow.location.href; | |
| if (newHref !== lastDispatched) { | |
| callback(newHref); | |
| lastDispatched = newHref; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import EventComponent from './EventComponent'; | |
| import { mount } from 'enzyme'; | |
| import { | |
| createStartTouchEventObject, | |
| createMoveTouchEventObject | |
| } from './EventHelpers.js'; | |
| describe('EventComponent', () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main exposing (main) | |
| import Browser | |
| import Html exposing (Html, button, div, text) | |
| import Html.Events exposing (onClick) | |
| type alias Model = | |
| { count : Int } |
Prerequisites:
- Heroku CLI installed on your computer
- A project deployed to Heroku
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Sort Algorithms in Elixir | |
| # Selection Sort | |
| defmodule Selection do | |
| def sort(list) when is_list(list) do | |
| do_selection(list, []) | |
| end | |
| def do_selection([head|[]], acc) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import _ from 'underscore'; | |
| import fetch from 'isomorphic-fetch' | |
| class API { | |
| getCSRFToken() { | |
| return _.find(document.getElementsByTagName('meta'), (meta) => { | |
| return meta.name === 'csrf-token' | |
| }).content | |
| } |
NewerOlder