Skip to content

Instantly share code, notes, and snippets.

View dannyvassallo's full-sized avatar

Dan Vassallo dannyvassallo

View GitHub Profile
@nickcernis
nickcernis / mailchimp-popup-for-wordpress.md
Last active July 28, 2022 14:49
MailChimp Popup Script that works with WordPress sites

MailChimp's default popup scripts can break on WordPress sites that use jQuery/jQuery UI unless you include their embed code as the final elements before the closing body tag.

Including them in this way isn't always possible or easy with WordPress.

The code below is an alternative implementation of the loader that forces MailChimp's popup scripts to appear below all other scripts upon page load.

To use it, modify the baseUrl, uuid, and lid attributes with the ones from the original popup script that MailChimp supplies.

@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active December 29, 2024 07:04
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@dannyvassallo
dannyvassallo / _materializecss-rails-confirm.coffee
Last active November 24, 2016 00:29
Replace Rails 4 confirmation/prompts with a toast message from Dogfalo Materialize CSS. Regular repo - https://github.com/Dogfalo/materialize Sass Gem - https://github.com/mkhairi/materialize-sass Website - http://materializecss.com/
$ ->
$.rails.allowAction = (link) ->
return true unless link.attr("data-confirm")
$.rails.showConfirmDialog link
false
$.rails.confirmed = (link) ->
link.removeAttr "data-confirm"
link.trigger "click.rails"
@dannyvassallo
dannyvassallo / SSHftp.md
Last active September 15, 2015 18:45
SSH into and FTP, Back it up, and copy the backup

#Back up your FTP site with SSH (excluding databases)

Sub in your URLs, username, and folder names. You can practically copy paste these into the terminal and it will work.


  1. SSH into the ftp and enter your password when asked:
  1. List the directories:
@dannyvassallo
dannyvassallo / googlesheets.js
Last active December 10, 2015 14:22
Send Email When Drive Sheet is Reaching Cap
//*****************************************************//
// HOW TO USE //
//*****************************************************//
//1) GOTO TOOLS > SCRIPT EDITOR
//2) PASTE THIS SCRIPT INTO THE EDITOR
//3) CHANGE MAXNUM & EMAILS TO SUIT YOUR NEEDS
//4) SAVE THE SCRIPT AND NAME IT
//5) CLICK THE CLOCK ICON TO SETUP TRIGGERS
//6) ADD A TRIGGER TO SUIT YOUR NEEDS
//7) MAKE SURE YOU AUTHORIZE THE FUNCTION
@dannyvassallo
dannyvassallo / Force Livereload on Middleman
Last active August 29, 2015 14:22
Force Livereload on Middleman
bundle exec middleman --force-polling --verbose
@eliotsykes
eliotsykes / rails-dev-box-postgresql-HOWTO.md
Last active August 29, 2015 14:07
How to setup rails-dev-box & PostgreSQL

SSH to the vagrant OS command line.

Terminal $> vagrant ssh

Login to postgres database as vagrant user with the psql client:

vagrant@rails-dev-box: psql -U vagrant postgres
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
@awatson1978
awatson1978 / gist:a0df5fef953b9da01ce1
Last active May 19, 2017 11:57
Publish an Atom Package
command-shift-P > Package > Package Generator: Generate Syntax Theme > mypackage
cd ~/.atom/packages/mypackage
apm login
apm develop mypackage
cd ~/github/mypackage
sudo chown -R username:wheel .
git commit -a -m 'checking everything in'
apm publish --tag v2.5.0 minor