Skip to content

Instantly share code, notes, and snippets.

View pburtchaell's full-sized avatar

Patrick Burtchaell pburtchaell

View GitHub Profile
@ericjsilva
ericjsilva / mysql_backup_dropbox.php
Created August 16, 2013 14:08
Quickly and easily backup your MySQL database and have the .tgz copied to your Dropbox account. Requires the DropboxUploader.php utility here: https://github.com/jakajancar/DropboxUploader/blob/master/DropboxUploader.php Original post about this script can be found at my website: http://ericsilva.org/2012/07/05/backup-mysql-database-to-dropbox
<?php
/**
* Quickly and easily backup your MySQL database and have the .tgz copied to
* your Dropbox account.
*
* Copyright (c) 2012 Eric Silva
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active April 30, 2024 19:21
5 entertaining things you can find with the GitHub Search API
@tommaitland
tommaitland / form.html
Last active January 1, 2024 09:55
A form with every HTML form element (up to HTML5) for styling.
<form action="/">
<legend>A Sample Form Legend</legend>
<label for="name">Name: </label>
<input type="text" value="Name" name="Name" />
<label for="email">Email: </label>
<input type="email" value="Email" name="Email" />
@csexton
csexton / gist:3772971
Created September 23, 2012 20:36
/etc/init.d/znc startup script
#! /bin/sh
### BEGIN INIT INFO
# Provides: znc
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: znc initscript
# Description: This is the init-Script for znc.
### END INIT INFO
# Author: Henner M. Kruse
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 23, 2024 18:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@passcod
passcod / dom-loaded-test.html
Created May 26, 2012 08:29
onload, readyState, and DOMContentLoaded
<!DOCTYPE html>
<html>
<head>
<script>
window.onload = function () {
console.log(''+(+new Date)+': Onload fired');
};
document.onreadystatechange = function () {
console.log(''+(+new Date)+': Ready state changed');
@itgoeslikethis
itgoeslikethis / ajaxsubscribe.html
Created April 10, 2012 13:23 — forked from jdennes/LICENSE
Subscribing to a Campaign Monitor list using AJAX and a really basic animation on success
<!-- 1. Take your Campaign Monitor subscribe form as generated from within your account: -->
<form action="http://myaccount.createsend.com/t/r/s/aljhk/" method="post" id="subForm">
<div>
<label for="name">Name:</label><br /><input type="text" name="cm-name" id="name" /><br />
<label for="aljhk-aljhk">Email:</label><br /><input type="text" name="cm-aljhk-aljhk" id="aljhk-aljhk" /><br />
<input type="submit" value="Subscribe" />
</div>
</form>
@eikes
eikes / getElementsByClassName.polyfill.js
Created April 4, 2012 08:04
Polyfill for getElementsByClassName
// Add a getElementsByClassName function if the browser doesn't have one
// Limitation: only works with one class name
// Copyright: Eike Send http://eike.se/nd
// License: MIT License
if (!document.getElementsByClassName) {
document.getElementsByClassName = function(search) {
var d = document, elements, pattern, i, results = [];
if (d.querySelectorAll) { // IE8
return d.querySelectorAll("." + search);
@4poc
4poc / LimitStream.js
Created December 10, 2011 03:41
Node.js: LimitStream (Bandwidth limited Readable+Writable Stream)
var fs = require('fs'),
util = require('util'),
Stream = require('stream').Stream;
/**
* Create a bandwidth limited stream
*
* This is a read+writeable stream that can limit how fast it
* is written onto by emitting pause and resume events to
* maintain a specified bandwidth limit, that limit can
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version