Skip to content

Instantly share code, notes, and snippets.

@jeromecoupe
jeromecoupe / webstoemp-gulpfile.js
Last active November 7, 2025 05:29
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
@mburakerman
mburakerman / package.json
Last active November 19, 2025 15:18
Webpack 4 config.js (SCSS to CSS and Babel) 👌 The Simplest Usage 👌
{
"name": "webpack-sass",
"version": "1.0.0",
"scripts": {
"start": "webpack-dev-server --open --mode development",
"build": "webpack -p"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
  • MAMP: https://www.mamp.info/en/downloads/
  • Craft CMS: https://craftcms.com/pricing
  • Open up MAMP
    • Preferences -> Web Server
      • Change Document Root to public folder in Craft CMS download
    • Start Servers
  • If it doesn't open automatically hit "open WebStart page"
  • tools -> phpMyAdmin
    • top left "new" button
  • database name: project_name
@paulirish
paulirish / bling.js
Last active September 13, 2025 12:13
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
// Define class to hold all cart drop related items
cartDrop: {
// Initialize the cart bindings, or whatever
init: function() { ... },
events: {
bind: function() {
// sample: $(cart-trigger).on(click, BERG.cartDrop.events.open);
@emasters
emasters / GTWForm.inc
Created September 10, 2013 20:11
This is a basic form for registering for a GoToWebinar webinar. The code can be pasted into a page and it will work. It needs to have the webinar key inserted where indicated. You can get the key from the GTW URL, it is the number that makes up the final element of the registration URL. Some fun styling has been added so the forms look neat on w…
<form action="https://www2.gotomeeting.com/en_US/island/webinar/registration.flow" method="post" name="webinarRegistrationForm">
<div id="regParent" class="regFields">
<input type="hidden" name="Template" value="island/webinar/registration.tmpl">
<input type="hidden" name="Form" value="webinarRegistrationForm">
<input type="hidden" name="WebinarKey" value="##INSERT WEBINAR KEY HERE##">
<input type="hidden" name="ViewArchivedWebinar" value="false">
<input type="hidden" name="registrant" value="">
<input type="hidden" name="RegistrantTimeZoneKey" id="RegistrantTimeZoneKey" value="64">
<div class="formRow">
<span class="error">*</span><label for="Name_First">First Name: </label> <input type="text" name="Name_First" id="Name_First" value="" maxlength="128" class="fis">
@rdallaire
rdallaire / Interface Tricks
Last active December 14, 2015 23:18
CSS & Other Interface Enhancements
<!-- CSS Arrows
========================================= -->
.arrow-up {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid black;
}
.arrow-down {
@rdallaire
rdallaire / Before end body
Created October 6, 2012 00:12
Common liquid snippets
These snippets are to included right before the </body> tag:
- Mouse-Chaser Reference ––
{{ site.mouse_chaser }}
- High-Slide Reference ––
<div id="highslide-container"></div>
<div id="controlbar" class="highslide-overlay controlbar">
<a href="javascript:void(0)" onclick="return hs.previous(this)" title="Previous (left arrow key)"></a>
<a href="javascript:void(0)" onclick="return hs.next(this)" title="Next (right arrow key)"></a>
<a href="javascript:void(0)" class="highslide-move" title="Click and drag to move" style="margin-left: 10px"></a>