Skip to content

Instantly share code, notes, and snippets.

View dan-gamble's full-sized avatar

Dan Gamble dan-gamble

View GitHub Profile
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
###############################################################################
# General UI/UX #
###############################################################################
var gulp = require('gulp');
var shell = require('gulp-shell');
var inject = require('gulp-inject');
var replace = require('gulp-html-replace');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var runSequence = require('run-sequence');
// BASE SETUP
// =============================================================================
var gulp = require('gulp');
var fs = require('fs');
var path = require('path');
// CALL THE PACKAGES -----------------------------------------------------------
var browserSync = require('browser-sync');
var autoPrefixer = require('gulp-autoprefixer');
var bower = require('gulp-bower');
# Created by https://www.gitignore.io
### PyCharm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
{
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : true, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope
"eqeqeq" : true, // true: Require triple equals (===) for comparison
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
"immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
<div class="headerBottom">
<div class="container">
<nav class="secondary-nav">
<ul class="list list-inline">
<li class="list-item">
<a href="#">Overview</a>
</li>
<li class="list-item">
<a href="#">Due diligence</a>
</li>
<!--
Below we have one main div with the id 'waypoint'
and 2 buttons with the id's 'before' and 'after'
the aim of this is when you click the respective buttons
this image 'https://i.imgur.com/0AZnj2E.gif' will appear before
and after the waypoint div as marked out by comments
Code goes in the script tags below
-->
<!DOCTYPE html>
<html>
<!--
Below we have one main div with the id 'waypoint'
and 2 buttons with the id's 'before' and 'after'
the aim of this is when you click the respective buttons
this image 'https://i.imgur.com/0AZnj2E.gif' will appear before
and after the waypoint div as marked out by comments
Code goes in the script tags below
-->
<!DOCTYPE html>
<html>
'use strict';
let DjangoCSRFToken = React.createClass({
render: function () {
var csrfToken = $.cookie('csrftoken');
return React.DOM.input(
{type: 'hidden', name:'csrfmiddlewaretoken', value:csrfToken}
)
}
import gulp from 'gulp';
import gulpLoadPlugins from 'gulp-load-plugins';
import browserSync from 'browser-sync';
import {bs} from '../Gulpfile.babel';
import config from './_config';
const $ = gulpLoadPlugins();
const reload = browserSync.reload;
export default () => {