Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
actively contributing

Evan Gillogley evanjmg

👨‍💻
actively contributing
View GitHub Profile
View theme.config.tsx
import Config from 'react-native-config'
import { IBaseColor } from './color'
export enum ThemeProvider {
velocity = 'velocity',
appB = 'appB',
}
interface ITheme {
ThemeLogo: any // img asset
ThemeLogoWithText: any // img asset
View build.gradle
...
flavorDimensions "client", "environment"
productFlavors {
production {
dimension "environment"
resValue "string", "build_config_package", "com.appB.consumer" // this is a placeholder - will be replaced on build
}
staging {
dimension "environment"
View set_env.sh
#!/bin/bash
set -e
GREEN='\033[0;32m'
YELLOW='\033[0;93m'
RED='\033[0;31m'
CYAN='\033[0;36m'
NC='\033[0m'
View Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
View color.tsx
export interface IBaseColor {
// main colors
ACCENT: string
WHITE: string
SURFACE: string
PRIMARY: string
BACKGROUND: string,
ON_SURFACE: string
ON_BACKGROUND: string
HIGHLIGHTED_PRIMARY: string // highlighted primary is equalivalent on primary
View .env.appB.production
IOS_RELEASE_TYPE=appstore
ITUNES_CONNECT_TEAM_ID=7325235
APPLE_TEAM_ID=2352352
PRODUCT_BUNDLE_IDENTIFIER=com.appb.consumer
APPLE_CI_USERNAME=yourusername@gmail.com
CRASHALYTICS_IOS_KEY=1242kj4jk24
BRANCH_SCHEME=appB
BRANCH_HOST=myappb.co
BRANCH_PREFIX=/dsgg
BRANCH_KEY=key_live_made_up_key
View environment-file-structure
|-- .env.velocity.staging
|-- .env.velocity.production
|-- .env.appB.staging
|-- .env.appB.production
@evanjmg
evanjmg / circular-linked-list.js
Created Feb 3, 2019
Rotation of Circular Linked List without Tail
View circular-linked-list.js
const createNode = (value) => ({
value,
next: null,
})
class CircularLinkedList {
constructor() {
this.length = 0
this.head = null
}
push(value) {
@evanjmg
evanjmg / index.html
Last active Feb 19, 2017
Drag, Zoom in Grid d3 v4
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.axis path {
display: none;
}
.axis line {
stroke-opacity: 0.3;
shape-rendering: crispEdges;
}
View drag-implementation.js
var previousDraggedPosition = null,
selected = null;
// snap to grid is simply rounding to the nearest resolution of the square
function snapToGrid(p, r) {
return Math.round(p / r) * r;
}
// we'll use a resolution of 50 here
var cubeResolution = 50;
// randomly generate points, but make sure they snap to grid
var points = d3.range(10).map(() => {
You can’t perform that action at this time.