Skip to content

Instantly share code, notes, and snippets.

View Rob117's full-sized avatar
🍰

Rob S. Rob117

🍰
  • Freelance
  • Tokyo
View GitHub Profile
import * as functions from 'firebase-functions';
import * as admin from 'firebase-admin';
export const signUp = functions.https.onRequest(async (request, response) => {
admin.initializeApp()
if (request.method !== "POST") {
return response.status(400).send();
}
var data = request.body;
if (data.token !== "TOKEN FROM ENV HERE") {
@Rob117
Rob117 / .rubocop.yml
Created December 15, 2018 04:08
Rubocop Love, Rubocop Life
AllCops:
Exclude:
- 'vendor/**/*'
- 'bin/**/*'
- 'spec/fixtures/**/*'
- 'db/schema.rb'
- 'db/seeds.rb'
TargetRubyVersion: 2.3
Rails:
@Rob117
Rob117 / .eslintrc.js
Last active September 18, 2020 18:47
Eslint for React Native, sensible settings
module.exports = {
extends: 'universe/native',
plugins: ['react', 'react-native'],
rules: {
'react/jsx-closing-bracket-location': 2,
'brace-style': [2, '1tbs'],
'react/jsx-max-props-per-line': [
'error',
{ maximum: 1, when: 'multiline' }
],
@Rob117
Rob117 / index.js
Last active May 28, 2018 14:57
This is how a function works
// function FUNCTIONAME (引数1、引数2){
// 何かの計算か行動をして
// 値を返す(任意)
// return SOMESTUFF
// }
function addTwoThings(thingOne, thingTwo){
return thingOne + thingTwo;
}
words = addTwoThings('bat ', 'man'); // wordsの入っている値は 'bat man'
@Rob117
Rob117 / Explanation.txt
Created February 19, 2018 05:43
Error log for Detox setup & contribution guide
> detox-test@0.0.1 build:ios /Users/r-sherling/detox/detox/test
> detox build --configuration ios.sim.release
set -o pipefail && export CODE_SIGNING_REQUIRED=NO && export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -project ios/example.xcodeproj -scheme example_ci -configuration Release -sdk iphonesimulator -derivedDataPath ios/build | xcpretty
▸ Building React/yoga [Release]
▸ Check Dependencies
▸ Building React/double-conversion [Release]
▸ Check Dependencies
▸ Running script 'Install Third Party'
▸ Compiling bignum.cc
@Rob117
Rob117 / Logs.txt
Last active February 14, 2018 23:54
Verbose logs for Detox issue
node_modules/.bin/jest e2e --config=e2e/config.json --runInBand
server listening on localhost:62008...
onOpen [object Object]
send: {"type":"login","params":{"sessionId":"88453d00-8a51-5ceb-8488-c701def3ca20","role":"tester"},"messageId":0}
onMessage: {"type":"loginSuccess","params":{"sessionId":"88453d00-8a51-5ceb-8488-c701def3ca20","role":"tester"},"messageId":0}
rbx
: applesimutils --list "iPhone 7" --maxResults=1
: Searching for device matching iPhone 7...
[ stdout:
{tdout:
@Rob117
Rob117 / makepdf
Created May 20, 2017 14:24
Convert files in directories into aggregated pdfs
Dir['*'].each do |d|
Dir.chdir(d){`convert * #{d}.pdf`} if File.directory? d
end