Skip to content

Instantly share code, notes, and snippets.

View siggiarni's full-sized avatar

Sigurður Árni Svanbergsson siggiarni

View GitHub Profile
@siggiarni
siggiarni / dropdown-font.html
Created February 5, 2014 11:53
Font substitution work in dropdowns
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<link rel="stylesheet" type="text/css" href="http://cdn.webrupee.com/font">
<style>
body,html,*{font-family: 'WebRupee';}
option,select{ font-family:inherit;}
</style>
var pixelRatio = (window.devicePixelRatio >= 1.5) ? "HiDPI" : "1X";
if (window.devicePixelRatio) ga('set', 'DevicePixelRatio', pixelRatio, 2);
// if (window.devicePixelRatio) _gaq.push(['_setCustomVar', 1, 'DevicePixelRatio', pixelRatio, 2]);
@siggiarni
siggiarni / class-list.html
Created April 14, 2014 10:24
List all CSS classes in a HTML document to the console.
<script type="text/javascript">
var used = [];
var elements = null;
//get all elements
if (typeof document.getElementsByTagName != 'undefined') {
elements = document.getElementsByTagName('*');
}
if (!elements || !elements.length) {
input[type=search] {
-webkit-appearance: none;
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button
{
display: none;
}
@siggiarni
siggiarni / gist:11254753
Created April 24, 2014 13:34
Enabling the FTP Server on OS X Mavericks
Load the FTP server
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
Unload the FTP server
sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist
http://igerry.com/desktop/apple-os/enabling-ftp-server-os-x-mavericks.html
@siggiarni
siggiarni / css-whitespace.css
Last active August 29, 2015 14:02
CSS space
/* whitespace */
.foo {
content: "\0020";
}
/* non-breaking space */
.bar {
content: "\00a0";
}
.blend-modes {
background-blend-mode: screen;
background-blend-mode: overlay;
background-blend-mode: darken;
background-blend-mode: lighten;
background-blend-mode: color-dodge;
background-blend-mode: color-burn;
background-blend-mode: hard-light;
background-blend-mode: soft-light;
background-blend-mode: difference;
<input type="text" pattern="[0-9]*" inputmode="numeric" autocomplete="cc-number">