This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as backlogjs from 'backlog-js'; | |
import 'dotenv/config'; | |
import 'cross-fetch/polyfill'; | |
import * as fs from 'fs'; | |
type Wiki = { | |
name: string; | |
content: string | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from 'react'; | |
export const ReactHooksQuiz01 = () => { | |
const [isInitialized, setIsInitialized] = useState(false); | |
console.log('a) isInitialized = ', isInitialized); | |
useEffect(() => { | |
setIsInitialized(true); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handleEmailLogin(event) { | |
firebaseAuth() | |
.signInWithEmailAndPassword(this.state.emailField, this.state.passwordField) | |
.catch(function (error) { | |
if (error) { | |
console.error('Error(' + error.code + '): ' + error.message); | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { firebaseAuth, firebaseDb } from '../../lib/firebase' | |
constructor(props) { | |
super(props) | |
this.provider = new firebaseAuth.TwitterAuthProvider() | |
} | |
handleTwitterLogin(event) { | |
firebaseAuth().signInWithPopup(this.provider) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handleEmailSineup(event) { | |
firebaseAuth() | |
.createUserWithEmailAndPassword(this.state.emailField, this.state.passwordField) | |
.catch(function (error) { | |
if (error) { | |
console.error('Error(' + error.code + '): ' + error.message); | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
admin.database().ref("/sites") | |
.orderByChild('user_count') | |
.startAt(3) | |
.limitToLast(20) | |
.once('value') | |
.then((snapshot) => { | |
let sites = snapshots.val() | |
if (sites == null) { return } | |
for (let site_key in sites) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% netstat -a | grep afp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// loads Resources/mvc/components/myview.js | |
self.App.loadComponent('myview'); |