Skip to content

Instantly share code, notes, and snippets.

View gotpop's full-sized avatar
🍭

GotPop gotpop

🍭
View GitHub Profile
@gotpop
gotpop / micro-clearfix.css
Created November 9, 2013 15:18
Micro clearfix
/* Clearfix */
.parent-object:after {
content: "";
display: table;
clear: both;
}
@gotpop
gotpop / markup
Last active August 29, 2015 14:07
Simple responsive tables
<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>
@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;
}
@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 / 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 / .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'
{
"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 / 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
@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"
},