Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Kati Frantz bahdcoder

🏠
Working from home
View GitHub Profile
View gist:2cbccc20b4a107666df105bc5d39a6d4
#
# REQUIRES:
# - server (the forge server instance)
# - site_name (the name of the site folder)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - event_id (the provisioning event name)
# - callback (the callback URL)
#
@bahdcoder
bahdcoder / udemy-course.sh
Last active Nov 3, 2017
Installation of Laravel on Ubuntu 16 server
View udemy-course.sh
#
# Requirements:
# - Ubuntu server
# - Root password for ubuntu server
# ssh into the server from local computer
ssh root@{server_name or server_ip_address}
#Updating ubuntu base packages
@bahdcoder
bahdcoder / parse-and-stringify-query-strings.js
Created May 18, 2018
parse-and-stringify-query-strings
View parse-and-stringify-query-strings.js
// takes in ?by=kati-frantz and returns { by: 'kati-frantz' }
export const parse = (queryString) => {
if (queryString[0] === '?') {
queryString = queryString.substring(1)
}
let queries = queryString.split("&")
const params = {}
queries.forEach(query => {
const queryObject = query.split('=')
@bahdcoder
bahdcoder / parse-and-stringify-query-strings.js
Created May 22, 2018
parse and stringify query strings
View parse-and-stringify-query-strings.js
// takes in ?by=kati-frantz and returns { by: 'kati-frantz' }
const parse = (queryString) => {
if (queryString[0] === '?') {
queryString = queryString.substring(1)
}
let queries = queryString.split("&")
const params = {}
queries.forEach(query => {
const queryObject = query.split('=')