- Generate phoenix app
$ mix phx.new phx_react
Fetch and install dependencies? [Yn] y- Generate react app in the
assetsdirectory
| #!/usr/bin/env ruby | |
| require 'yaml' | |
| require 'json' | |
| require 'pathname' | |
| require 'open3' | |
| require 'set' | |
| require 'ripper' # For Ruby comment stripping | |
| # Load configuration from .ziprc.local or .ziprc |
| # If you don't remember the exact path/name, search the log for deleted files | |
| git log --diff-filter=D --summary | grep delete | |
| # Find the file you want to get from the ouput, and use the path | |
| # Find the commits that involved that path | |
| git log --all -- some/path/to/deleted.file | |
| # Bring the file back to life to the current repo (sha commit of parent of commit that deleted) | |
| git checkout shaofthecommitthatdeletedthefile^ -- some/path/to/deleted.file |
| #!/usr/bin/env ruby | |
| # frozen_string_literal: true | |
| # rubocop:disable Metrics/LineLength, Metrics/MethodLength | |
| # | |
| # _________ ________ __________ | |
| # \_ ___ \ \_____ \\______ \ | |
| # / \ \/ / | \| | _/ | |
| # \ \____/ | \ | \ | |
| # \______ /\_______ /______ / |
| #!/bin/bash | |
| du -sh * | gsort -h | tail -r -- |
| func laterInTime(days time.Duration, do func()) { | |
| resetTime := func() { | |
| jwt.TimeFunc = func() time.Time { | |
| return time.Now() | |
| } | |
| } | |
| defer resetTime() | |
| jwt.TimeFunc = func() time.Time { | |
| return time.Now().Add(time.Hour * 24 * days) |
| // usage: | |
| // cy.poll({ | |
| // fn: () => cy.request(...), | |
| // until: response => response.body.count === 1, | |
| // assertFn: response => expect(response.body).to.deep.eq({ | |
| // count: 1, | |
| // }), | |
| // timeout: 120000, | |
| // interval: 10000, | |
| // }) |
| 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/' \ |
| // * ===== 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/ | |
| // * |
$ mix phx.new phx_react
Fetch and install dependencies? [Yn] yassets directory| #!/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: | |
| # |