Dear all Github friends,
I moved this gist to the Github repository.
Following this repository https://github.com/nijicha/install_nodejs_and_yarn_homebrew
import React from 'react' | |
import { Checkbox } from '@shopify/polaris' | |
export default function CheckboxAdapter({ input, meta, ...rest }) { | |
return ( | |
<Checkbox | |
{...input} | |
{...rest} | |
error={meta.touched && meta.error} | |
onChange={(value) => { |
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import "babel-polyfill"; | |
const App = ()=> { | |
return <h1>I'm an app</h1> | |
} | |
const init = () => { | |
ReactDOM.render(<App />, document.getElementById("reactApp")); |
Dear all Github friends,
I moved this gist to the Github repository.
Following this repository https://github.com/nijicha/install_nodejs_and_yarn_homebrew
Disclaimer: The instructions are the collective efforts from a few places online. | |
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did. | |
First off, bundle. | |
================== | |
1. cd to the project directory | |
2. Start the react-native packager if not started | |
3. Download the bundle to the asset folder: | |
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle" |
{ | |
"New NG2 Component (Item)": { | |
"prefix": "ng2c", | |
"body": [ | |
"import {Component, View, CORE_DIRECTIVES, FORM_DIRECTIVES} from 'angular2/angular2';", | |
"// import {ExampleListComponent} from '../example/example-list.component';", | |
"", | |
"@Component({", | |
" selector: '${1:dashed-name}',", | |
" properties: ['id']", |
var string_to_slug = function (str) | |
{ | |
str = str.replace(/^\s+|\s+$/g, ''); // trim | |
str = str.toLowerCase(); | |
// remove accents, swap ñ for n, etc | |
var from = "àáäâèéëêìíïîòóöôùúüûñçěščřžýúůďťň·/_,:;"; | |
var to = "aaaaeeeeiiiioooouuuuncescrzyuudtn------"; | |
for (var i=0, l=from.length ; i<l ; i++) |
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
// See also: http://www.paulund.co.uk/change-url-of-git-repository | |
$ cd $HOME/Code/repo-directory | |
$ git remote rename origin bitbucket | |
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
$ git push origin master | |
$ git remote rm bitbucket |
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
app.factory('csrfRequestInterceptor' , function($q , $injector){ | |
var _token = false; | |
return { | |
request : function(config){ | |
var CSRF_URL = '/csrfToken'; | |
if(config.url == CSRF_URL || config.method == "GET"){ | |
return config; | |
} | |
// sailsjs hasn't time limit for csrf token, so it is safe to cache this | |
// remove this to request a new token |
# ----------------------------------------------------------------- | |
# .gitignore for WordPress | |
# Bare Minimum Git | |
# http://ironco.de/bare-minimum-git/ | |
# ver 20150227 | |
# | |
# This file is tailored for a WordPress project | |
# using the default directory structure | |
# | |
# This file specifies intentionally untracked files to ignore |