Skip to content

Instantly share code, notes, and snippets.

View trafnar's full-sized avatar

Nathan Manousos trafnar

View GitHub Profile
<link rel="stylesheet" type="text/css" href="http://nathanmanousos.com/fewd/test.css" />
@trafnar
trafnar / style.css
Created May 30, 2013 00:03
CSS for sample HTML page.
@import url(http://fonts.googleapis.com/css?family=Domine:400,700);
@import url(http://fonts.googleapis.com/css?family=Shadows+Into+Light+Two);
body{
font-family: 'Domine', helvetica, arial, sans-serif;
color: #353634;
background-color: #eff2ea;
-webkit-font-smoothing: antialiased;
}
header{
@trafnar
trafnar / web-app.html
Created December 11, 2012 10:14 — forked from tfausak/ios-8-web-app.html
iOS web app icons & startup images
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="yes" name="apple-mobile-web-app-capable">
<title></title>
<!-- iPhone -->
<link href="http://taylor.fausak.me/static/images/apple-touch-icon-57x57.png"
@trafnar
trafnar / gyazo_dropbox.rb
Created August 18, 2012 22:57
replacement script for gyazo to save files to your dropbox public folder
#!/usr/bin/env ruby
dropbox_user_id = 'YOUR_DROPBOX_USER_ID'
nyazo_folder_name = 'nyazo' # or your folder name of choice
system_user = IO.popen("whoami", "r+").gets.chomp
nyazo_folder_path = "/Users/#{system_user}/Dropbox/Public/#{nyazo_folder_name}"
system "mkdir -p #{nyazo_folder_path}"
filename = "#{(0...8).map{65.+(rand(25)).chr}.join.downcase}.png"
image_path = "#{nyazo_folder_path}/#{filename}"
require 'linguistics'
# Helper function to pick the correct indefinite article for a number
# e.g. number_with_indefinite_article(10) #=> "a 10"
# e.g. number_with_indefinite_article(80, "$") #=> "an $80"
def number_with_indefinite_article(number, prefix=nil)
if [11,18].include?(number)
article = "an"
elsif number.to_s[0] == "8"
article = "an"
@trafnar
trafnar / gist:1526386
Created December 28, 2011 04:56
Halting problem
doesProgramHalt = (program) ->
if halts(program) == true
return true
else
return false
q = (program) ->
if doesProgramHalt(program)
return
else
<!DOCTYPE html>
<html>
<head>
<title>Stacks</title>
<style type="text/css" media="screen">
*{margin:0; padding:0;}
body{font-size:18px;}
#container{background-color:Tomato; width:500px; margin:50px auto;}
#container #first_row{background-color:PaleGreen;}
#container #second_row{background-color:PowderBlue;}
@trafnar
trafnar / multi_columns.html
Created June 16, 2011 00:23
multi columns
<!DOCTYPE html>
<html>
<head>
<title>Multi Columns</title>
<style type="text/css" media="screen">
*{margin:0; padding:0;}
body{font-size:18px;}
#container{overflow:hidden; width:510px; background-color:Tomato; margin:50px auto;}
#container .column{width:120px; float:left; margin-left:10px; background-color:YellowGreen ;}
<!DOCTYPE html>
<html>
<head>
<title>Grid</title>
<style type="text/css" media="screen">
*{margin:0; padding:0;}
body{font-size:18px;}
#container{overflow:hidden; width:510px; background-color:Tomato; margin:50px auto;}
#container ul{list-style-type:none; margin-right:-10px;}
@trafnar
trafnar / dual_columns.html
Created June 16, 2011 00:21
dual columns
<!DOCTYPE html>
<html>
<head>
<title>Dual Columns</title>
<style type="text/css" media="screen">
*{margin:0; padding:0;}
body{font-size:18px;}
#container{overflow:hidden; width:500px; background-color:Tomato; margin:50px auto;}
#container #first_column{width:250px; float:left; background-color:DarkSalmon;}