Skip to content

Instantly share code, notes, and snippets.

@Sstobo
Sstobo / gist:1920e3257ba9621466d1e6cb43988561
Last active January 26, 2018 15:32
[React serve local json] #react #json
npm i -g json-server
json-server --watch db.json -p 4000
// "test": "echo \"Error: no test specified\" && exit 1",
// "start": "PORT=4001 nodemon index.js"
const items = fetch(' http://localhost:4000/items');
@Sstobo
Sstobo / react-day2.txt
Created January 10, 2018 19:44
[React Day2] #react
State
One-way data flow
Two-way data binding
Synthetic events
### Ref
For taking input from forms
@Sstobo
Sstobo / react-day1.txt
Created January 9, 2018 21:52
[React Day 1] #react
SSR -> Server Side Rendering
SPA -> Single Page Application
#### SETUP Local Development Server #####
use html boiler plate in ADP
-> npm i -g http-server
-> http-server
-->create-react-app [name of app]
@Sstobo
Sstobo / freelanceaccounting.txt
Created December 1, 2017 05:13
[Freelancing Accounting] #freelance #accounting #job #pay
Use Wave / Toggl to bill
Include correct info
-date
-description of services
-payment terms (date, late fees, ect)
-GST / Reference number
-under 1000$ pay with credit card
Save Taxes
@Sstobo
Sstobo / freelance.txt
Created December 1, 2017 03:30
[Freelancing] #job #career #freelance
#### Solo Marketing
-referals are lifelines
-mo clients mo problems
-be selective
#### Business Development
-talk budget
-go to events that are attended by people who are my clientelle (small business owners, ect)
-prioritize! Reflect on value generated by meetings
@Sstobo
Sstobo / salary.txt
Created November 30, 2017 23:14
[Salary Negotiation] #salary #careers #job
!!GET WEBSITE FROM ANNIKA DO COURSE
##### PREPARE FOR SALARY CONVERSATION #####
1) Understand the market and your value
# do your homework #
* assess own value (salary.com, payscale) -
* determine market salary range (glassdoor, indeed, linkedin)
2) Know what is important to you
@Sstobo
Sstobo / seo.txt
Created November 29, 2017 21:11
[SEO] #seo
###### Traffic sources
-linking
-ads working?
-where to spend
-location
###### Site metrics
-how many people
-how many visits
-performace / bandwidth
@Sstobo
Sstobo / wpplugins.txt
Created November 22, 2017 17:16
[wp plugins] #wp #setup
contact form 7
kint debugger
kint php debugger
query monitor
show current template
wp forms lite
@Sstobo
Sstobo / gist:6ab9d6eb705251e265538f60c8ce76ce
Created November 21, 2017 19:05
[posts in json] #json #wp #api
GET http://fourth.academy.red/wp-json/wp/v2/posts
http://fourth.academy.red/: URL of the WP installation
/wp-json: the endpoint prefix
/wp: the namespace of the WP REST API plugin
/v2: the version of the WP REST API plugin
/posts: the resource you want to get from the server
@Sstobo
Sstobo / gist:d118f7bac63ce2eec49aa99b91e47294
Created November 21, 2017 17:48
[json formatter / nonce] #json #wp #nonce #security
http://localhost:8888/inhab/wp-json/wp/v2/posts
post into postman api
options gives schematic for api
######### GENERATE NONCE LINK
function red_scripts() {
$script_url = get_template_directory_uri() . '/scripts.js';
wp_enqueue_script( 'jquery' );