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
@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(){
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@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?

@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": [
{
@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;
@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
@brianoz
brianoz / class-virtualthemedpage-bc.php
Created February 20, 2014 01:10
WordPress Virtual page with theme
<?php
/*
* Virtual Themed Page class
*
* This class implements virtual pages for a plugin.
*
* It is designed to be included then called for each part of the plugin
* that wants virtual pages.
*
* It supports multiple virtual pages and content generation functions.
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>
@ahmadazimi
ahmadazimi / replace-zero-width-space.php
Last active April 23, 2024 16:20
PHP replace Zero Width Space using preg_replace
<?php
/**
* http://stackoverflow.com/questions/11305797/remove-zero-width-space-characters-from-a-javascript-string
* U+200B zero width space
* U+200C zero width non-joiner Unicode code point
* U+200D zero width joiner Unicode code point
* U+FEFF zero width no-break space Unicode code point
*/