(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
var data = "do shash'owania"; | |
var crypto = require('crypto'); | |
crypto.createHash('md5').update(data).digest("hex"); |
# Put this function to your .bashrc file. | |
# Usage: mv oldfilename | |
# If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
# Original mv is called when it's called with more than one argument. | |
# It's useful when you want to change just a few letters in a long name. | |
# | |
# Also see: | |
# - imv from renameutils | |
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
# Default termtype. If the rcfile sets $TERM, that overrides this value. | |
set -g default-terminal screen-256color | |
# support logging out and back in | |
set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION" | |
# pbcopy support | |
set-option -g default-command "reattach-to-user-namespace -l bash" | |
# vi mode |
This is really just an approach for locally testing DNS changes, which can easily be done with a HOSTS file if the change involves an IP address, but gets a bit trickier when things like CNAMEs are involved. This is only meant to test locally off a single machine.
Install bind using homebrew
brew install bind
Follow the installation steps to start up bind
import React from 'react' | |
/* | |
* Higher order component that passes `getInitialProps` through | |
* to the child component | |
*/ | |
const HOC = function(Child) { | |
return class Higher extends React.Component { | |
static getInitialProps(ctx) { | |
return Child.getInitialProps(ctx) |
A not politically correct assertion of my feelings towards a piece of software:
Note: Repetition builds cynicism, asset_sync
isn't bad, but when an asset problem cannot be solved via support it gets escalated to me. Often times someone using asset_sync
the problem is due to their use of the library and not from Heroku.
The asset sync gem uploads your assets (images, css, javascript) to S3. From there you can either point browsers to the copy on S3 or use a CDN + the S3 bucket. It's a good idea, and solved a problem at one time.
It is no longer needed and you should now use https://devcenter.heroku.com/articles/using-amazon-cloudfront-cdn instead. So rather than copying your assets over to S3 after they are precompiled the CDN grabs them from your website instead. Here's some reasons why it's better.
/** | |
* Vertically center Bootstrap 3 modals so they aren't always stuck at the top | |
*/ | |
$(function() { | |
function reposition() { | |
var modal = $(this), | |
dialog = modal.find('.modal-dialog'); |
@ReactMethod | |
public void areNotificationsEnabled(Promise promise) { | |
try { | |
Boolean areEnabled = NotificationManagerCompat.from(getReactApplicationContext()).areNotificationsEnabled(); | |
promise.resolve(areEnabled); | |
}catch (Exception e) { | |
promise.reject(e); | |
} | |
} |
To circle.yml: | |
dependencies: | |
post: | |
- bin/cisetup | |
checkout: | |
post: | |
- git fetch origin --depth=1000000 |