Skip to content

Instantly share code, notes, and snippets.

View kerns's full-sized avatar
🎯
Pushing an update...

David Kerns kerns

🎯
Pushing an update...
View GitHub Profile
@muffix
muffix / check_ubiquiti_dream_router_availability.sh
Created December 1, 2021 11:13
Checks the Ubiquiti store for availability of the Dream Router
#!/bin/zsh
# Fill in your webhook here
WEBHOOK=https://httpbin.org/get
STORE_URL=https://eu.store.ui.com
while true; do
AVAILABLE=$(curl --silent ${STORE_URL}/products.json | jq '.products[] | select(.handle=="dream-router-ea").variants[0].available')
if [[ "${AVAILABLE}" == "true" ]]; then
/**
* Settings
*/
var settings = {
scripts: true, // Turn on/off script tasks
polyfills: true, // Turn on/off polyfill tasks
styles: false, // Turn on/off style tasks
svgs: false, // Turn on/off SVG tasks
static: false, // Turn on/off static file copying
@dtomasi
dtomasi / default
Last active December 8, 2023 04:20
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@mithereal
mithereal / Git-precommit-hook-mysqldump
Last active April 14, 2021 00:12 — forked from wilcollins/Git-precommit-hook-mysqldump
Git pre-commit hook for MySQL database backup ( remote mysqldump + Git push )
#!/bin/bash -e
# -e means exit if any command fails
DBHOST=address.to.your.server
DBUSER=username
DBPASS=password # do this in a more secure fashion
DBNAME=DBNAME
GITREPO=/where/is/your/repo
DUMP=$GITREPO/where/you/store/dumps
NEW=$DUMP/schema.sql
OLD=$NEW.old
@jasonmccallister
jasonmccallister / db.php
Created October 26, 2013 20:23
My Craft db.php configuration for AppFog.com
<?php
/**
* Database Configuration
*
* All of your system's database configuration settings go in here.
* You can see a list of the default settings in craft/app/etc/config/defaults/db.php
*/
if ($_SERVER['HTTP_HOST'] == 'local.domainname.com') {
@twosixcode
twosixcode / gist:1988097
Created March 6, 2012 18:40
Make "Paste and Indent" the default paste in Sublime Text 2
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
@mfkp
mfkp / index.html
Created December 17, 2011 01:39
mailchimp ajax signup form example
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="jquery.ketchup.all.min.js" type="text/javascript"></script>
</head>
<body>
<div id="email">
<span>Enter your email to sign up</span>
<form action="/subscribe.php" id="invite" method="POST">