Skip to content

Instantly share code, notes, and snippets.

@garrettmac
garrettmac / Readme.md
Last active July 4, 2017 18:03
The basics on how to build a Chrome Extension.

s

@garrettmac
garrettmac / notes.md
Created July 2, 2017 02:10
Nick Jacques

chsh -s $(which zsh)

@garrettmac
garrettmac / example.js
Last active May 5, 2022 08:03
Reddit API using AXIOS
import { Platform } from 'react-native'
import axios from 'axios'
import _ from 'lodash'
import subreddits from '../../subreddits'
import { extendObservable, action, observable } from 'mobx'
import normalizeUrl from 'normalize-url'
const appId = Platform.select({
ios: 'io.vyga.[APP NAME HERE]',
android: 'io.vyga.[APP NAME HERE]'
@garrettmac
garrettmac / test-script.js
Last active June 25, 2017 16:00
Building a Shopify App
alert("test script alert")
@garrettmac
garrettmac / Readme.md
Created June 22, 2017 15:33
Into to hiring a web or mobile app developer

https://www.reddit.com/r/SomebodyMakeThis/ https://www.reddit.com/r/AppIdeas/ https://www.reddit.com/r/apps/ https://www.reddit.com/r/webdev/ InVision you would use before hiring someone, this is an easy to use design / design flow service that syncs with photoshop that you would share with a developer. (Twitter, Uber, and Netflix I Know use this)

To gadge how big/well known a developer/developer company/web service company is see how big and how many followers their twitter has, the webdev community kinda trains you to use this as a tool and find their github.com page to gadge what other projects they've done, here you;'d check To communicate with developer while in project is in development you should use (or expect them to use) Slack.com or the chat feature InVision uses (assuming you're using InVision) https://www.invisionapp.com/

@garrettmac
garrettmac / index.js
Last active June 18, 2017 23:14
RN ListView - hide first and last in list
state={
endsOfArray:{first:0,last:4,},
numberOfVisableItems:4,
array:[{"id":0,"opacity":1,"name":"Jobe Holly"},{"id":1,"opacity":1,"name":"Bernie Sanders"},{"id":2,"opacity":1,"name":"Al Frankin"},{"id":3,"opacity":1,"name":"Elizabeth Warren"},{"id":4,"opacity":1,"name":"Cory Booker"},{"id":5,"opacity":1,"name":"Sanders"},{"id":6,"opacity":1,"name":"Al"},{"id":7,"opacity":1,"name":"Elizabeth"},{"id":8,"opacity":1,"name":"Booker"}],
}
_onChangeVisibleRows(visibleRows, changedRows) {
let visableItems=_.map(visibleRows.s1, function(active, id) {return { id: id, active: active };})
// console.warn(" visableItems.length: ",visableItems.length);
@garrettmac
garrettmac / example.js
Last active January 14, 2022 19:11
react native congressmen floating bubble heads example
import React, { Component } from 'react';
import { StyleSheet, View,Text, Image, Animated, Dimensions } from 'react-native';
import Interactable from 'react-native-interactable';
const widthFactor = Dimensions.get('window').width / 375;
const heightFactor = (Dimensions.get('window').height - 75) / 667;
const showSecondFace = true;
const showThirdFace = true;
const showFourthFace = true;
@garrettmac
garrettmac / pulse.css
Last active May 24, 2017 21:12
pulse.css
.pulse {display: block;box-shadow: 0 0 0 rgba(204,169,44, 0.4);animation: pulse 2s infinite;}
.pulse:hover {animation: none;}
@-webkit-keyframes pulse {
0% {
-webkit-box-shadow: 0 0 0 0 rgba(204,169,44, 0.4);
}
70% {
-webkit-box-shadow: 0 0 0 10px rgba(204,169,44, 0);
@garrettmac
garrettmac / animation-panresponder.md
Last active August 16, 2017 17:35
Blog Posts for React Native - Post 1:Native ModulesPost 2: Pan Responder (Animation)

Lets start with boiler template

/* @flow */

import React, { Component } from 'react';
import {
  View,
  TouchableOpacity,
  Text,
@garrettmac
garrettmac / index.html
Created May 20, 2017 15:57
thumbtack.com
<!DOCTYPE html>
<!--[if IE 7 ]> <html lang="en" class="ie7 "> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="ie8 "> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="ie9 "> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class=""> <!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1"><meta http-equiv="Content-Style-Type" content="text/css" /><meta http-equiv="Content-Script-Type" content="text/javascript" /><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name=dropbox-domain-verification content=0gjo970nvgw9 /><title>Thumbtack - Consider it done</title><meta property="fb:app_id" content="131357050011"><meta
property="og:url"