Skip to content

Instantly share code, notes, and snippets.

https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#adding-your-ssh-key-to-the-ssh-agent
@technoplato
technoplato / social.js
Created June 23, 2018 05:47
Social Following / Follower / Feed / Posts structure on Firebase in Node
const admin = require('firebase-admin');
const serviceAccount = require('/Users/lustig/Development/Javascript/FirebasePractice/service-account.json');
const axios = require('axios');
const myUid = '-LFcicCx0VxhBraCZbfP';
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: 'https://react-native-firebase-18440.firebaseio.com/'
});
@technoplato
technoplato / RCTSRWebSocket.m
Created July 22, 2018 23:21
Fix for RCTSRWebSocket.m for React Native
//
// Copyright 2012 Square Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
@technoplato
technoplato / TEMPLATE.md
Last active October 8, 2019 10:18
__TEMPLATE.md__
@technoplato
technoplato / 002.tabs.txt
Last active August 27, 2018 18:06
Radio Show You Can Read Episode 2 Extra Content
List of tabs I had open at the end of the video:
https://otter.ai/conversation/222KSWVHZ6GQNL4O/Z3JvdXA%253D?a=MjEyNDU%253D
https://www.youtube.com/upload
https://www.youtube.com/watch?v=VBL7e3NtPTI&feature=youtu.be
https://www.youtube.com/user/nobani88/videos
https://www.youtube.com/watch?v=4D7VB_t0uLE
https://www.youtube.com/watch?v=3Sz2-6RNkjY
https://www.youtube.com/watch?v=jey_CzIOfYE
https://www.youtube.com/watch?v=xRJ91lVQyRA
i:
Ayyy yo.
Wanna do a cool experiment?
Stephen Sharikov:
Perfect timing
What’s up? I’ve got a bit of time
i:
Glad to hear it
Okay
@technoplato
technoplato / ios fixes.txt
Last active July 4, 2019 19:27
React Native Cheat Sheet
* Something about glob and double-convert and the build failing on Xcode
https://github.com/facebook/react-native/issues/21168#issuecomment-422431294
@technoplato
technoplato / postlist.js
Created September 8, 2019 20:52
Likes with Firestore
import React from 'react'
import { FlatList, View, Share } from 'react-native'
import firestore from '@react-native-firebase/firestore'
import PostItem from './PostItem'
import ShowNewPostsButton from './ShowNewPostsButton'
export default class PostsList extends React.PureComponent {
// Staged posts are posts that have been added remotely but not shown yet.
state = { posts: {}, staged: {} }
@technoplato
technoplato / plainascanbe.js
Last active April 2, 2020 14:43
Infinite Scrolling List Flavors
import React, { useState, useEffect } from 'react'
import {
SafeAreaView,
View,
FlatList,
StyleSheet,
Text,
Dimensions
} from 'react-native'
@technoplato
technoplato / attempt1.swift
Last active October 4, 2019 18:04
YouTube Video Upload Swift OAuth2
import Foundation
import Alamofire
// I __think__ this actually does work, I was just providing an inavlid token.
// I've now used the upload-video.py script below that generates a token in the folder you run the script (as long as you've got credentials setup in that directory)
// Using that token, this script works. Now I just need to figure out how to add the name, description, tags, etc.
func postVideoToYouTube(callback: (Bool) -> Void){
let url = "https://www.googleapis.com/upload/youtube/v3/videos?part=id"