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
<!-- 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
// 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
// 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
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
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
<!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
require 'rufus/scheduler' | |
scheduler = Rufus::Scheduler.start_new | |
if Rails.env.production? | |
scheduler.every '10m' do | |
require "net/http" | |
require "uri" | |
Net::HTTP.get_response(URI.parse(ENV["HOSTNAME"])) | |
end | |
end |
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
#! /usr/bin/env ruby | |
require 'fileutils' | |
require 'erb' | |
require 'RMagick' | |
include Magick | |
template = ERB.new <<-EOF | |
<!DOCTYPE html> | |
<html> |
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
################################################################## | |
# # | |
# Copyright (C) 2012 Dommmel <dommmel@gmail.com> # | |
# This code is released under WTFPL, version 2.0. # | |
# # | |
################################################################## | |
# Usage: | |
# <span id="sayhi">привет</span> | |
# <script> |