Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Got Pop gotpop

🎯
Focusing
View GitHub Profile
@gotpop
gotpop / CMD.md
Created Jun 28, 2019
Single command set up
View CMD.md

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 / keybindings.json
Last active Jun 4, 2018
VSCODE.Settings
View keybindings.json
[
{
"key": "ctrl+shift+`",
"command": "workbench.action.terminal.toggleTerminal"
},
{
"key": "ctrl+`",
"command": "workbench.action.terminal.focus",
"when": "!terminalFocus"
},
@gotpop
gotpop / pre-commit
Last active Sep 29, 2017
Modify the variable to change the protected git branch
View pre-commit
#!/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
View vscode.settings.js
{
"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 / .bash_profile
Last active Mar 27, 2019
Coloured Terminal Output on Mac
View .bash_profile
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 / package.json
Last active May 3, 2017
A simple package.json
View 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 ."
}
}
View readme.md

##Simple AJAX example

  • New request
  • Callback
  • Open
  • Send
@gotpop
gotpop / gulpfile.js
Created Apr 26, 2016
A Nunjucks Gulp task.
View gulpfile.js
////////////////////////////////////////////////////////////////////////////////////
// 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'),
@gotpop
gotpop / Layout mixins SASS
Last active Aug 29, 2015
This is a simple layout mixin that I use for laying out simple page blocks.
View Layout mixins SASS
///////////////////////////////////////////////////////////////////////////////////////////////
// Width float mixin
///////////////////////////////////////////////////////////////////////////////////////////////
@mixin float($width) {
width: $width;
float: left;
display: block;
clear: none;
}
@gotpop
gotpop / markup
Last active Aug 29, 2015
Simple responsive tables
View markup
<div class="table-wrapper">
<div>
<table border="0" class="pricing-table-a">
<tbody>
<tr><th>&nbsp;</th><th>Medical</th><th>Cancellation</th><th>Winter Sports Equipment</th><th>Piste Closure</th><th>Price<sup>(1)</sup></th></tr>
<tr class="highlight">
<td>Columbus Direct</td>
<td>£10 million</td>
<td>£3,000</td>
<td>£400</td>