create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
This is one way to pass some data (API tokens, etc.) to your Jekyll templates without putting it in your _config.yml
file (which is likely to be committed in your GitHub repository).
Copy the environment_variables.rb
plugin to your _plugins
folder, and add any environment variable you wish to have available on the site.config
object.
In a Liquid template, that information will be available through the site
object. For example, _layouts/default.html
could contain:
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |
After publishing my article on ECMAScript 6, some have reached out to ask how I exactly I make it all work.
I refrained from including these details on the original post because they're subject to immiment obsoletion. These tools are changing and evolving quickly, and some of these instructions are likely to become outdated in the coming months or even weeks.
When evaluating the available transpilers, I decided to use 6to5, which has recently been renamed to Babel. I chose it based on:
let d3 = require("d3"); | |
let d3tip = require("d3-tip"); | |
d3tip(d3); |
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; | |
// Open (or create) the database | |
var open = indexedDB.open("MyDatabase", 1); | |
// Create the schema | |
open.onupgradeneeded = function() { | |
var db = open.result; | |
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"}); |
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't
#!/bin/sh | |
# This hook will make sure that the commit message contains a JIRA issue. | |
# | |
# To enable this hook, rename this file to ".git/hooks/commit-msg". | |
# Make sure to add execution permissions to the file. | |
export MESSAGE=$(<$1) | |
export JIRA_ISSUE_TAG='ISSUETAG-([0-9]*)' | |
if [[ $MESSAGE =~ $JIRA_ISSUE_TAG ]]; then |
<# | |
.SYNOPSIS | |
Renames pictures. | |
.DESCRIPTION | |
The Rename-Pictures cmdlet to rename pictures to a format where the file creation time is first | |
in the name in this format: . The idea is that | |
.PARAMETER Path | |
Specifies the path to the folder where image files are located. Default is current location (Get-Location). |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |