Skip to content

Instantly share code, notes, and snippets.

@prplmark
prplmark / gulpfile.js
Last active August 16, 2021 22:40
Gulpfile with Webpack and SCSS watch
// Essentials
var gulp = require('gulp');
var webpack = require('webpack'); // Include webpack to add definePlugin
var webpackStream = require('webpack-stream'); // Use webpack-stream to compile
// Sass Requires
var sass = require('gulp-sass'); // Include SASS
var autoprefix = require('gulp-autoprefixer'); // Autoprefixer (always)
var rename = require('gulp-rename'); // Gulp Rename
var sourcemaps = require('gulp-sourcemaps'); // Sourcemaps (for sass)
@BrendonCon
BrendonCon / SassMeister-input-HTML.jade
Last active August 29, 2015 14:16
A "mobile" menu complete with hamburger button made from a checkbox whose checked state opens and toggles the menu in and out of view.
input.nav-menu__btn(type="checkbox")
nav.nav-menu
a.nav-menu__item Home
a.nav-menu__item About
a.nav-menu__item Contact
a.nav-menu__item Work
a.nav-menu__item Social
@danharper
danharper / background.js
Last active March 30, 2024 18:25
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->