Skip to content

Instantly share code, notes, and snippets.

View jamesholcomb's full-sized avatar

James Holcomb jamesholcomb

View GitHub Profile
@dereknelson
dereknelson / alphabetizedList.js
Created March 29, 2018 18:03
Alphabetized List implementation
import React, { Component, } from 'react';
import { View, Text, TouchableOpacity, FlatList, ListItem, Image, TextInput, Dimensions,
Animated, StyleSheet, SectionList, PanResponder, PixelRatio, ScrollView } from 'react-native';
import sectionListGetItemLayout from 'react-native-section-list-get-item-layout'
var { height, width } = Dimensions.get('window')
/* this component is re-used between displaying the friends/groups and being able to pick them in metoo posts, so there are a few different if statements that
@rcugut
rcugut / [GUIDE] macos yarn nvm install.md
Last active July 10, 2023 11:49
GUIDE for mac OS X yarn nvm node install

GUIDE to install yarn, nvm (node) on macOS

last update: Dec 4, 2020

Assumptions:

  • macOS >= 10.14 (Mojave); tested with 10.15 (Catalina)
  • homebrew properly installed
@mattmattmatt
mattmattmatt / Pioneer VSX-824.md
Last active May 4, 2023 01:08
Control Pioneer amplifier VSX-824 remotely for home automation via Telnet on port 8102.

Telnet in:

telnet 192.168.1.128 8102 Use cmd + alt + 6 to stop transmission, q(uit) to exit telnet.

Telnet and exit:

telnet 192.168.1.128 8102 >> EOF
PO
EOF
@psxvoid
psxvoid / delete-evicted-pods-all-namespaces.sh
Created August 6, 2018 14:41
Delete evicted pods from all namespaces (also ImagePullBackOff and ErrImagePull)
#!/bin/sh
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d
# delete all evicted pods from all namespaces
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff state from all namespaces
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces
const position = {
latitude: 45.417224,
longitude: -122.659946
}
const { JSDOM } = require('jsdom')
const jsdom = new JSDOM('<!doctype html><html><body></body></html>')
const { window } = jsdom
global.window = window
import React from 'react';
import { View, StyleSheet, ActivityIndicator } from 'react-native';
import { FlatList } from '../searchBarAnimation';
import { List, ListItem } from 'react-native-elements';
export default class Tab extends React.PureComponent {
constructor(props) {
super(props);
this.state = {

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@whoisryosuke
whoisryosuke / Update-branch.md
Created September 17, 2019 17:38 — forked from santisbon/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

Using JSDOC-Based TypeScript

Get Started

Choose your editor

  • WebStorm, Rider
    • Partial support, not enough intelli hints
    • Toggle on TypeScript language service
  • VSCode
@AlixBou
AlixBou / MainApplication.java
Last active August 11, 2020 19:25
How to use turbo module within java code
import com.facebook.react.ReactApplication ;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.ReactPackage;
import com.facebook.react.TurboReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.module.model.ReactModuleInfo;
import com.facebook.react.module.model.ReactModuleInfoProvider;
import com.facebook.react.shell.MainReactPackage;