Instantly share code, notes, and snippets.

View reddit api docs (json)
require 'nokogiri'
require 'json'
html = `curl 'https://www.reddit.com/dev/api/' \
-H 'authority: www.reddit.com' \
-H 'cache-control: max-age=0' \
-H 'upgrade-insecure-requests: 1' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36' \
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' \
-H 'referer: https://www.google.co.jp/' \
View 1_qwerty.txt
// * ===== Colemak =====
// *
// * Kinesis Advantage 2 Colemak Layout File Copyright 2016 by Greg Dietsche.
// * Licensed under the MIT License.
// * See LICENSE file in the project root for full license information.
// *
// * Colemak was created by Shai Coleman and is in the Public Domain.
// *
// * Learn more about Colemak here: https://colemak.com/
// *
View phx_react_tutorial.md
  1. Generate phoenix app
$ mix phx.new phx_react
Fetch and install dependencies? [Yn] y
  1. Generate react app in the assets directory
View rename
#!/usr/bin/env bash
#
# Simple file and folder renaming utility.
#
# Makes use of the [sharkdp/fd](https://github.com/sharkdp/fd) find script
# to rename files and folders
#
# Usage example:
#