This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html><head></head> | |
<!-- Standard Facebook Initialization --> | |
<body> | |
<div id="fb-root"></div> | |
<button>Loading...</button> | |
<script> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert logo-solo.png -bordercolor white -border 0 \ | |
\( -clone 0 -resize 16x16 \) \ | |
\( -clone 0 -resize 32x32 \) \ | |
\( -clone 0 -resize 48x48 \) \ | |
\( -clone 0 -resize 64x64 \) \ | |
-delete 0 -transparent white -colors 256 favicon.ico |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'celluloid' | |
require "benchmark" | |
require 'open-uri' | |
delay_seconds = [4,4,4,4,4,4] | |
BASE_URL = "http://slowapi.com/delay" | |
class Crawler | |
include Celluloid | |
def read(delay) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doSomething() { | |
open(location.href, 'refreshingWindow'); | |
} | |
(function loop() { | |
var rand = Math.round(Math.random() * (10000)) + 1000; | |
setTimeout(function() { | |
doSomething(); | |
loop(); | |
}, rand); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A simple storage connector plugin to the Parse REST interface. | |
* | |
* Note: the plugin requires jQuery to be linked into the host page. | |
* | |
* THIS PLUGIN IS FOR DEMO PURPOSES ONLY - DON'T USE IN A PRODUCTION | |
* ENVIRONMENT. | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// use it like this: <a class="scroll" href="#destination1">Destination 1</a> | |
// <section id="destination1">Lore ipsum</section> | |
$(".scroll").click(function(event){ | |
event.preventDefault(); | |
//calculate destination place | |
var dest=0; | |
if($(this.hash).offset().top > $(document).height()-$(window).height()){ | |
dest=$(document).height()-$(window).height(); | |
}else{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hide adress bar on iphone/android | |
$(function() { | |
function hideURLbar() { | |
if (window.location.hash.indexOf('#') == -1) { | |
window.scrollTo(0, 1); | |
} | |
}; | |
if (navigator.userAgent.indexOf('iPhone') != -1 || navigator.userAgent.indexOf('Android') != -1) { | |
addEventListener("load", function() { | |
setTimeout(hideURLbar, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- add this to the dict node --> | |
<key>CFBundleIdentifier</key> | |
<string>com.apple.AppleScript.SnomDialer</string> | |
<key>CFBundleURLTypes</key> | |
<array> | |
<dict> | |
<key>CFBundleURLName</key> | |
<string>SnomDialer</string> | |
<key>CFBundleURLSchemes</key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Addressbook to SNOM export | |
-- Be sure to open Contacts app before running this script | |
set resultText to "" | |
set currentLine to "" | |
set numPhones to 0 | |
tell application id "com.apple.AddressBook" | |
set the clipboard to people's vcard | |
-- Find the maximum number of phone numbers | |
repeat with x from 1 to the count of people |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get the url of an emails gravatar image | |
# | |
# default_image can either be an image url or one of the following: mm, identicon, monsterid, wavatar, retro, blank | |
# (See https://de.gravatar.com/site/implement/images/ for all options) | |
# | |
# Example usage: | |
# get_gravatar_image_url("[email protected]", 80, "retro") | |
get_gravatar_image_url = (hashed_email, size=80, default_image="mm", force_default=false) -> | |
size = (if (size >= 1 and size <= 2048) then size else 80) |