Skip to content

Instantly share code, notes, and snippets.

Masahiko Tachizono mshk

View GitHub Profile
View firebase-email-login.js
handleEmailLogin(event) {
.signInWithEmailAndPassword(this.state.emailField, this.state.passwordField)
.catch(function (error) {
if (error) {
console.error('Error(' + error.code + '): ' + error.message);
View firebase-twitter-login.js
import { firebaseAuth, firebaseDb } from '../../lib/firebase'
constructor(props) {
this.provider = new firebaseAuth.TwitterAuthProvider()
handleTwitterLogin(event) {
View firebase-email-signup.js
handleEmailSineup(event) {
.createUserWithEmailAndPassword(this.state.emailField, this.state.passwordField)
.catch(function (error) {
if (error) {
console.error('Error(' + error.code + '): ' + error.message);
View firebase_fetch_once_sample.js
.then((snapshot) => {
let sites = snapshots.val()
if (sites == null) { return }
for (let site_key in sites) {
mshk / gist:6276780
Last active Dec 21, 2015 — forked from matsubo/gist:2543898
Read files under the folder you choose and add them to Evernote as text note. Updated version of . Difference is that this script reads contents of the text files and set them as contents of newly created Evernote notes, instead of adding text files as attachments.
View gist:6276780
set listOfNames to {}
set theFolder to choose folder "Select the source folder"
tell application "Finder"
set filelist to every file of the folder theFolder
repeat with currentFile in filelist
set currentFileName to (the name of currentFile)
set nom to currentFileName
if text -4 of nom is "." then
set currentFileName to (text 1 thru -5 of nom)
mshk / gist:2498914
Created Apr 26, 2012
How to get the ip address of network drive mounted via AFP on MacOSX
View gist:2498914
% netstat -a | grep afp
mshk / loadComponentsInTiMVC
Created Mar 22, 2012
Load components in TiMVC
View loadComponentsInTiMVC
// loads Resources/mvc/components/myview.js
You can’t perform that action at this time.