Skip to content

Instantly share code, notes, and snippets.

View bahdcoder's full-sized avatar
🏠
Working from home

Frantz Kati bahdcoder

🏠
Working from home
View GitHub Profile
@bahdcoder
bahdcoder / parse-and-stringify-query-strings.js
Created May 22, 2018 02:15
parse and stringify query strings
// 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('=')
@bahdcoder
bahdcoder / parse-and-stringify-query-strings.js
Created May 18, 2018 17:16
parse-and-stringify-query-strings
// 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 / udemy-course.sh
Last active November 3, 2017 21:17
Installation of Laravel on Ubuntu 16 server
#
# 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
#
# 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)
#