Skip to content

Instantly share code, notes, and snippets.

@kublaj
kublaj / cli-services.md
Created June 1, 2016 13:15 — forked from thomd/cli-services.md
Services for CLIs
@kublaj
kublaj / streaming-server.js
Created June 1, 2016 13:15 — forked from thomd/streaming-server.js
a streaming node server
var http = require('http');
http.createServer(function (request, response) {
response.setHeader('Content-Type', 'text/html; charset=UTF-8');
//response.setHeader('Transfer-Encoding', 'chunked');
var html =
'<!DOCTYPE html>' +
'<html lang="en">' +
'<head>' +
@kublaj
kublaj / semantic-layout.html
Created June 1, 2016 13:14 — forked from thomd/semantic-layout.html
Standard HTML5 Semantic Layout
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Title</title>
<link href="stylesheets/main.css" rel="stylesheet" />
</head>
<body>
<header>
<hgroup>
@kublaj
kublaj / mediaQueries.css
Created May 31, 2016 11:03 — forked from jhafner/mediaQueries.css
General list of media queries.
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px) and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width : 321px) {
/* Styles */
}
@kublaj
kublaj / git-open.sh
Created May 31, 2016 11:03 — forked from jhafner/git-open.sh
Open the current repo on Github. Script by Brian Edgerton.
#!/bin/bash
git_host='[email protected]:'
git_url='https://github.com/'
remote=`git config --get remote.origin.url`
host=${remote:0:15}
if [ $host = $git_host ]
then
url=${remote/$git_host/$git_url}
@kublaj
kublaj / fontStacks.css
Created May 31, 2016 11:03 — forked from jhafner/fontStacks.css
List of modern font stacks.
/* Times New Roman-based serif */
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
/* A modern Georgia-based serif */
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif," "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
/*A more traditional Garamond-based serif */
font-family: "Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
/*The Helvetica/Arial-based sans serif */
@kublaj
kublaj / vCenter.css
Created May 31, 2016 11:03 — forked from jhafner/vCenter.css
Vertically center inline content.
.container {
min-height: 6.5em;
display: table-cell;
vertical-align: middle;
}
@kublaj
kublaj / gradients.css
Created May 31, 2016 11:02 — forked from jhafner/gradients.css
CSS3 Gradients Template.
#colorbox {
background: #629721;
background-image: -webkit-gradient(linear, left top, left bottom, from(#83b842), to(#629721));
background-image: -webkit-linear-gradient(top, #83b842, #629721);
background-image: -moz-linear-gradient(top, #83b842, #629721);
background-image: -ms-linear-gradient(top, #83b842, #629721);
background-image: -o-linear-gradient(top, #83b842, #629721);
background-image: linear-gradient(top, #83b842, #629721);
}
@kublaj
kublaj / textcolumns.css
Created May 31, 2016 11:02 — forked from jhafner/textcolumns.css
CSS Text Columns
#columns-3 {
text-align: justify;
-ms-column-count: 3;
-ms-column-gap: 12px;
-ms-column-rule: 1px solid #c4c8cc;
-moz-column-count: 3;
-moz-column-gap: 12px;
-moz-column-rule: 1px solid #c4c8cc;
-webkit-column-count: 3;
-webkit-column-gap: 12px;
@kublaj
kublaj / no-ios-highlights.css
Created May 31, 2016 11:02 — forked from jhafner/no-ios-highlights.css
Disable Mobile Webkit Highlights
body {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}