Skip to content

Instantly share code, notes, and snippets.

View fvdm's full-sized avatar
🦖
I may be slow to respond

Franklin fvdm

🦖
I may be slow to respond
View GitHub Profile
contacts pushover
contact.pushover.command /path/to/pushover_munin.py
@kometchtech
kometchtech / homebrew.mxcl.pdnsrec.plist
Last active November 29, 2017 02:19
powerdns recursor for Mac OSX
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.pdnsrec</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/pdnsrec/sbin/pdns_recursor</string>
</array>
@davidlevy
davidlevy / convertGeoToPixel.php
Created July 1, 2013 07:32
Function to convert Geo coordinates To Pixels
<?php
function convertGeoToPixel($lat, $lon){
$mapWidth = 400;
$mapHeight = 260;
$mapLonLeft = -180;
$mapLonRight = 180;
$mapLonDelta = $mapLonRight - $mapLonLeft;
@malarkey
malarkey / Three Wise Monkeys.md
Created December 2, 2012 14:26
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@bactisme
bactisme / nginx_status_codes.py
Last active April 7, 2022 04:11
Very simple munin plugin to graph nginx HTTP error codes
#!/usr/bin/python
# ALL FAME GOES HERE : https://gist.github.com/mipearson/1146151
#
# 1/ Place where you want (like /usr/share/munin/plugins/nginx_status_codes.py )
# 2/ Link in /etc/munin/plugins/ :
# ln -s /usr/share/munin/plugins/nginx_status_codes.py /etc/munin/plugins/nginx_errors
# chmod +x /etc/munin/plugins/nginx_errors
# 3/ Test with
# munin-run nginx_errors
# 4/ If nescessary : add these lines in your munin conf
@JiveDig
JiveDig / remove-tinymce-editor-buttons.php
Last active February 24, 2023 06:00
Remove buttons/items from the WordPress TinyMCE editor
<?php
/**
* Removes buttons from the first row of the tiny mce editor
*
* @link http://thestizmedia.com/remove-buttons-items-wordpress-tinymce-editor/
*
* @param array $buttons The default array of buttons
* @return array The updated array of buttons that exludes some items
*/
add_filter( 'mce_buttons', 'jivedig_remove_tiny_mce_buttons_from_editor');
@Silvenga
Silvenga / dup-backup.sh
Last active February 25, 2023 10:45
For daily systemwide encrypted backups of Ubuntu servers to remote host of Google Drive (free 15GB of storage).
#!/bin/bash
# Place in /usr/share/backup/
# and make executable
# chmod 0744 dup-backup.sh
# install:
# apt-get install duplicity python-gdata python-gobject-2 python-paramiko
## Remeber to change Google drive user name and Google drive folder
## And change Email
# Must run as root for system wide backups
@aaronpk
aaronpk / gist:5846789
Last active January 2, 2024 22:47
Added WebFinger support to my email address using one rewrite rule and one static file.
[aaron@parecki.com www]$ cat .htaccess
RewriteEngine on
RewriteCond %{QUERY_STRING} resource=acct:(.+)
RewriteRule ^\.well-known/webfinger /profile/%1? [L]
[aaron@parecki.com www]$ cat profile/aaron@parecki.com
{
"subject": "acct:aaron@parecki.com",
"links": [
{
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@jaydson
jaydson / gist:1780598
Created February 9, 2012 15:11
How to detect a click event on a cross domain iframe
var myConfObj = {
iframeMouseOver : false
}
window.addEventListener('blur',function(){
if(myConfObj.iframeMouseOver){
console.log('Wow! Iframe Click!');
}
});
document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',function(){