Skip to content

Instantly share code, notes, and snippets.

View gotpop's full-sized avatar
🍭

GotPop gotpop

🍭
View GitHub Profile
@gotpop
gotpop / package.json
Last active October 6, 2023 14:15
A simple package.json
{
"name": "basic",
"version": "1.0.0",
"description": "Basic",
"scripts": {
"py3": "python -m http.server 7777",
"py2": "python -m SimpleHTTPServer",
"build": "touch index.html favicon.ico style.css app.js && npm run dev && atom ."
}
}
@gotpop
gotpop / CMD.md
Created June 28, 2019 13:44
Single command set up

yarn init -y && touch index.html && mkdir src && cd src && mkdir css js && cd css && touch style.css && cd ../js && touch index.js

@gotpop
gotpop / .bash_profile
Last active March 27, 2019 02:42
Coloured Terminal Output on Mac
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
@gotpop
gotpop / keybindings.json
Last active June 4, 2018 09:12
VSCODE.Settings
[
{
"key": "ctrl+shift+`",
"command": "workbench.action.terminal.toggleTerminal"
},
{
"key": "ctrl+`",
"command": "workbench.action.terminal.focus",
"when": "!terminalFocus"
},
@gotpop
gotpop / pre-commit
Last active September 29, 2017 10:46
Modify the variable to change the protected git branch
#!/bin/bash
protected_branch='develop'
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
if [ $protected_branch = $current_branch ]
then
read -p "You're about to commit to develop, is that really a world that you want to live in? [y|n] " -n 1 -r < /dev/tty
echo
if echo $REPLY | grep -E '^[Yy]$' > /dev/null
{
"workbench.iconTheme": "vscode-icons",
"git.enableSmartCommit": true,
"git.confirmSync": false,
"editor.tabSize": 4,
"files.autoSave": "off",
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.formatOnPaste": true,
"editor.detectIndentation": false,
@gotpop
gotpop / gulpfile.js
Created April 26, 2016 09:22
A Nunjucks Gulp task.
////////////////////////////////////////////////////////////////////////////////////
// Require
////////////////////////////////////////////////////////////////////////////////////
var gulp = require('gulp'),
prefix = require('gulp-autoprefixer'),
notify = require('gulp-notify'),
browserSync = require('browser-sync'),
reload = browserSync.reload,
sass = require('gulp-ruby-sass'),

##Simple AJAX example

  • New request
  • Callback
  • Open
  • Send
@gotpop
gotpop / micro-clearfix.css
Created November 9, 2013 15:18
Micro clearfix
/* Clearfix */
.parent-object:after {
content: "";
display: table;
clear: both;
}
@gotpop
gotpop / Layout mixins SASS
Last active August 29, 2015 14:13
This is a simple layout mixin that I use for laying out simple page blocks.
///////////////////////////////////////////////////////////////////////////////////////////////
// Width float mixin
///////////////////////////////////////////////////////////////////////////////////////////////
@mixin float($width) {
width: $width;
float: left;
display: block;
clear: none;
}