Skip to content

Instantly share code, notes, and snippets.

View bradbergeron-us's full-sized avatar

Brad Bergeron bradbergeron-us

View GitHub Profile
@bradbergeron-us
bradbergeron-us / Pg_DataDump
Last active August 29, 2015 14:22
Use for importing a database -> Add to init shell script then drop into ***/docker-entrypoint-initdb.d *** Start Postgres import via "pg_restore" then "stop database"
#!/bin/bash
: ${DB_USER:=db_user}
: ${DB_PASSWORD:=db_pass}
: ${DB_NAME:=db_name}
: ${DB_ENCODING:=UTF-8}
: ${DB_PG_DUMP_FILE:=/tmp/db.pgdump}
{ gosu postgres postgres --single -jE <<-EOSQL
CREATE USER "$DB_USER" WITH PASSWORD '$DB_PASSWORD';
@nickawalsh
nickawalsh / icons.sass
Last active October 7, 2021 09:38
Auto Hi-res Sprites
@import compass
$icons: sprite-map("icons/*.png")
$icons-hd: sprite-map("icons-hd/*.png")
i
background: $icons
display: inline-block
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi)
background: $icons-hd
@mrsweaters
mrsweaters / pause_and_resume.md
Created August 22, 2012 23:36
Joyride 2 Pause and Resume Example

The below configuration will pause the tour after tooltip 2 has appeared (index of 1). In the postStepCallback we check to see if the tour has been paused and fire some code.

<script>
  $(window).load(function() {
    $('#joyRideTipContent').joyride({
      pauseAfter : [1],
      postStepCallback : function (index, tip) {
        if ($(this).joyride('paused')) {
 console.log('Hey there, you\'ve paused the tour.');
/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {
$.event.special.textchange = {