Skip to content

Instantly share code, notes, and snippets.

View lawrence79's full-sized avatar

Lawrence Norton lawrence79

View GitHub Profile
@lawrence79
lawrence79 / mac_setup.sh
Created March 13, 2024 12:40 — forked from kpritam/mac_setup.sh
Setup new mac book (Installs brew, fish, iterm2, java, scala, sbt, chrome, slack, vs code, flycut etc.)
###########################################################
# Homebrew
# Fish Shell
# Fisherman
# Powerline Fonts
# iTerm2
curl https://raw.githubusercontent.com/ellerbrock/fish-shell-setup-osx/master/install.sh | bash
import { useState, useEffect } from 'react';
import axios from 'axios';
axios.defaults.baseURL = process.env.API_URL;
const useAxios = ({ url, method, body = null, headers = null }) => {
const [response, setResponse] = useState(null);
const [error, setError] = useState('');
const [loading, setloading] = useState(true);
@lawrence79
lawrence79 / git.alias.txt
Created September 4, 2019 13:55
git aliases
git:
gcl='git clone'
ga='git add'
grm='git rm'
gap='git add -p'
gall='git add -A'
gf='git fetch --all --prune'
gft='git fetch --all --prune --tags'
gfv='git fetch --all --prune --verbose'
gftv='git fetch --all --prune --tags --verbose'
@lawrence79
lawrence79 / frontendDevlopmentBookmarks.md
Created April 5, 2016 14:26 — forked from mobeendev/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
# file /etc/sudoers.d/go
# preferably edit using visudo -f <file>
# allow the go user to run some commands using sudo. Need to specify full path to command.
Cmnd_Alias GO_SUDO_CMDS = /usr/sbin/vzctl, /bin/umount /mnt/vzdata/*/projectdata
# don't require a tty for running sudo
Defaults!GO_SUDO_CMDS !requiretty
# don't require password
#square {
width: 100px;
height: 100px;
background: red;
}
#rectangle {
width: 200px;
height: 100px;
background: red;
google() {
for var in "$@"
do
open /Applications/Google\ Chrome.app/ "http://www.google.com/search?q=${var}"
done
}
@lawrence79
lawrence79 / jquery-1.8.js
Created April 2, 2015 15:53
Jquery 1.8.1
/*!
* jQuery JavaScript Library v1.8.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
@lawrence79
lawrence79 / preventDefaultException.js
Created December 2, 2014 22:29
preventDefaultException
preventDefaultException: { tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/ },