Skip to content

Instantly share code, notes, and snippets.

View robabby's full-sized avatar
🫡

Rob robabby

🫡
View GitHub Profile
@robabby
robabby / reducer-boilerplate.js
Created June 4, 2017 23:07
React Native Reducer Boilerplate
import {
SOME_ACTION // to be specified per use case
} from '../actions/types';
const INITIAL_STATE = {
}
export default (state = INITIAL_STATE, action) => {
switch (action.type) {
@robabby
robabby / list-linked-packages.sh
Last active January 18, 2018 22:03
list linked npm/yarn packages
ls -l node_modules | grep ^l
alias showHidden="ls -l node_modules | grep ^l"
@robabby
robabby / default
Created November 12, 2017 04:23 — forked from yacafx/default
NGNIX configuration for run node app and php app the same same time
### /etc/nginx/sites-available/default
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.php;
@robabby
robabby / index.html
Created November 12, 2017 15:30
[Blank HTML Document]
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The HTML5 Herald</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
@robabby
robabby / Brocfile
Created November 13, 2017 01:29 — forked from leandrocp/Brocfile
Deploy ember-cli app on nginx
/* global require, module */
// Prepend app name on assets names
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
fingerprint: {
enabled: true,
prepend: '/appX/'
@robabby
robabby / camphor.scss
Created December 4, 2017 14:14 — forked from bdno86/camphor.scss
camphor
$camphor300:'d09GMgABAAAAAQ5UABIAAAAEn0QAAQ3tAAEZmQAAAAAAAAAAAAAAAAAAAAAAAAAAG4SkahzOKgZgFotgAIosCCIJgnMRCAqLlgCKvTwBNgIkA5lwE4GnDguZdAAEIAW7bwcgDHJb0WS0WUXZkokWaBHx4wKbY7TigANIU/t980QCGzI/IkCsdbqJZwY1ZOgWDngIamw3I43435Dd+zJ1kNmKVp/DvXNAwaNm//////////////////+/NZkMZ5cAl0CpbZ3oiwloFA5GyIWNzOYVLt1bpXPX+pABI2fo5rMZpgVYIzYqgxt92ajECqUKh2G9gaOCVRC23VSRVypHfbvb7wYcwEM25WArF0esm1yKzDixrJRdcBGtcpBZTFbFbIl8LIU4gWOnEdSITqkoGrHWJ8ywn9eVFWWk3lC6m07qp1TXntHaWp6ekYHLrFoyzOXYiQnn2kWX2zqMaFBTca25vHKndPhJV66HRhQzL9lB3OT20KGTXuFHu62wm1qzoV/iTnaiLdc8o/D7B+1O94BrjSE3cia6U1A5XNp0kHmUj8IMBaeiGaiNJV7b1csb0bq8EWYo2h1TuipR+7hmYjxeZsonGLNcmgsKp5EUDCEj9SvRyxX2uMUNfINmfNqglBYNNtjtNmdwWV2ly4uQKheyDyka2RTRoQ3IEfs+0BNcGJ4Z5AnmHNpFbCKW5PsXkAzJ6VVzzVMo0fwIUpQQT67itTNRE946/NxDashl9KuAFUbZ6yW91vObh+WAMZ1mQ1J4wotF6KXHuo65X6wSz406hW/T6XZMf/6W+HGYUxCDfhyjPaoMGcWccmbYM/H35NdHTOd79Jg0ho/BDBvRy2vcg8pHsv07UYiKrDFeqzL0Qk7qCkXLuukl2EKuR3xS6VtsLEaT0BfWoDYoQ1YvEjjT729XNMYoCX3j+2ApedBG/UHLOJ7AAnfPSqdmmePsY+522MpfPaf7kf6fIJMn0/4SE6PmuI3yjyeGjWn+1qj/ukf09DE
@robabby
robabby / functional-setState.js
Created January 3, 2018 15:23
[Functional setState] #react
import React from 'react'
// Optional import from external file
import { increaseScore } from "../stateChanges"
// outside your component class
function increaseScore (state, props) {
return { score : state.score + 1 }
}
@robabby
robabby / mailchimp-api-add-subscriber.js
Created July 7, 2018 23:00
Add subscribers to a MailChimp list
/* eslint-env node */
'use strict';
var express = require('express');
var bodyParser = require('body-parser');
var request = require('superagent');
const keys = require('./config/keys');
var app = express();
var allowCrossDomain = function(req, res, next) {
@robabby
robabby / .bash_profile
Created September 14, 2018 15:42 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@robabby
robabby / normal.tsx
Created June 15, 2020 20:40
Apollo Client Examples
import { typeDefs } from "./schema/resolvers";
import { ApolloClient } from "apollo-client";
import { ApolloLink } from "apollo-link";
import { ApolloProvider } from '@apollo/react-hooks';
import App from "./App";
import { InMemoryCache } from "apollo-cache-inmemory";
import React from "react";
import { createUploadLink } from "apollo-upload-client";
import { getToken } from "./utils/cookies";
import initialQuery from "./schema/queries/isLoggedIn";