- Taipei 101
- Tamsui
- National Palace Museum
- Shi-men Ting
- Tonghua Night Market - my favorite
- There are some great bars nearby!
def tick args | |
# initialization | |
args.state.x ||= 620 | |
args.state.y ||= 700 | |
args.state.dy ||= 0 | |
args.state.dx ||= 25 | |
args.state.gravity = -0.5 | |
args.state.drag_coeff = 0.05 | |
args.state.walls = [ | |
[0, 0, 1280, 100], |
9 March, 2019
We were discussing with @erusev what we can do with async operation when using useReducer()
in our application. Our app is simple and we don't want to use a state management library. All our requirements are satisfied with using one root useReducer()
. The problem we are facing and don't know how to solve is async operations.
In a discussion with Dan Abramov he recommends Solution 3 but points out that things are fresh with hooks and there could be better ways of handling the problem.
This is a simplified, but fairly thorough, set of scripts and configuration to enable Heroku Release Phase for Rails apps.
Further, this particular set up plays nicely with Heroku Review Apps in that the release
phase script will:
bin/rails db:version
) is 0
.For a "normal" app that usually means it will run the DB migrations.
SETUP (nothing new here, it's from the docs)
On another server you control:
$ git clone https://github.com/letsencrypt/letsencrypt
$ cd letsencrypt
$ ./letsencrypt-auto
This is an example script for deleting assets that aren't linked in your content model. It does this by walking through all assets and checking for any links back to them.
WARNING: This script does not take into account assets that are only linked inside of Text fields. If you primarily embed images directly using the markdown editor, this will very likely delete assets you depend on.
You must fill in your own CMA access token & space ID at the top before running
jQuery.fn.brightness = function() { | |
var bg_color, rgba, y; | |
bg_color = this.css('background-color'); | |
if ((bg_color != null) && bg_color.length) { | |
rgba = bg_color.match(/^rgb(?:a)?\(([0-9]{1,3}),\s([0-9]{1,3}),\s([0-9]{1,3})(?:,\s)?([0-9]{1,3})?\)$/); | |
if (rgba != null) { | |
if (rgba[4] === '0') { | |
if (this.parent().length) return this.parent().brightness(); | |
} else { | |
y = 2.99 * rgba[1] + 5.87 * rgba[2] + 1.14 * rgba[3]; |
// Instructions: | |
// 1. Navigate to you GitHub dashboard, either (https://github.com or https://github.com/organizations/{org_name} | |
// 2. Click on "All repositories" or "Show N more repositories" to show all your repos | |
// 3. Open Firebug console, and paste this script. Optionally, change the options below | |
// 4. Run and have fun | |
var options = { | |
origin: "all", // can be: source, fork or all | |
visibility: "all", // can be: public, private or all | |
showInNewWindow: true |
Use the latest version of the copycopter_client
gem:
gem 'copycopter_client', '2.0.0'
Export your published drafts from copycopter.com:
RAILS_ENV=production bundle exec rake copycopter:export
This will create a config/locales/copycopter.yml
file.