Skip to content

Instantly share code, notes, and snippets.

if( function_exists('acf_add_local_field_group') ):
acf_add_local_field_group(array(
'key' => 'group_5ae2508670f5b',
'title' => 'Test Field',
'fields' => array(
array(
'key' => 'field_5ae2511a7ca5a',
'label' => 'Sean Test',
'name' => 'sean_test',
@Sstobo
Sstobo / gitflow.txt
Last active March 12, 2018 22:57
Git Workflow
CRITICAL GIT FLOW PROTOCOL
#### Creating individual branch for each feature ####
pick issue make a branch for it -
naming convention:
[firstname]-feature-[feature-name]
ie: sean-feature-schema
## CREATE NEW BRANCH
@Sstobo
Sstobo / nova.txt
Last active March 12, 2018 20:39
Nova app scope
Regular login - no facebook
Meeting for assets
Account creation page
Device location
Create profile page
Dropdown boxes (react-native, marterial)
Company list
Search / filter
-- skills information
-- search bar
#### start times for bookings by members named 'David Farrell'
select bks.starttime
from
cd.bookings bks
inner join cd.members mems
on mems.memid = bks.memid
where
mems.firstname='David'
and mems.surname='Farrell';
@Sstobo
Sstobo / redux-vocab
Created January 17, 2018 19:54
[React Redux vocabulary] #
REDUX GIVES YOU THE STORE, DISPATCH AND REDUCERS
###
store holds state
state is 0
click the +1 button
'dispatches an action (which is action and state) to reducer
switch in reducer = if ActionType = type(increment) and payload (1), use the increment switch in the reducer to add 1 to state
state gets send back to store
TV = "state machine"
Remote control sends "actions"
-channel up / down
-power on ect
Webpack Installation
Install Webpack and its dependencies in your project:
npm install --save-dev babel-loader babel-core babel-preset-stage-0 webpack webpack-dev-server html-webpack-plugin
Add scripts to your package.json:
const array = [
[name: sean,
age: 35,
height: 6
]
const CopyOfArray = { ...array };
##### Spread is how we copy arrays
@Sstobo
Sstobo / gist:fddb937331d1318edf31b9732220246a
Created January 16, 2018 00:42
[Reduce, map, filter, slice] #js
function toList(stockedList)
// Grocery store lab
const data = [
['apples', 73],
['pears', 12],
['oranges', 97],
['grapes', 387],
['grapes', 88],
@Sstobo
Sstobo / functional-programming.txt
Created January 15, 2018 23:51
[Functional Programming] #react #js
Procedural Programming
###### Pure function
- function that does not rely on data outside of its scope. Just does itself. No side effects.
- one output
- if it manipulates a global variable, it is impure (copy list into new variable, output that
- take an argument, make it newVariable, modify, output
{ robot.name = "Sean"} is a "reference" <- this will modify a global variable
{ robot = { name: "Sean" } } is "pass by value" <- this will not leave scope
@Sstobo
Sstobo / gist:2127d1f347ecb94480e9bf3dc74b62f2
Created January 11, 2018 19:42
[React Routing] #react #routing
import React, { Component } from 'react';
import { render } from 'react-dom';
import {
BrowserRouter as Router,
Route,
Switch,
Link,
Redirect
} from 'react-router-dom';