Skip to content

Instantly share code, notes, and snippets.

View lightyrs's full-sized avatar
🌒
ლ(▀̿̿Ĺ̯̿̿▀̿ლ)

Harris Novick lightyrs

🌒
ლ(▀̿̿Ĺ̯̿̿▀̿ლ)
View GitHub Profile
@lightyrs
lightyrs / lion_buttons.css
Created July 31, 2011 18:54
OS X Lion Buttons in Pure CSS3
/*
<a href="#" class="ok buttons">OK</a>
<a href="#" class="cancel buttons">Cancel</a>
<a href="#" class="inactive buttons">Inactive</a>
<a href="#" class="small buttons">Small</a>
@lightyrs
lightyrs / applehud.css
Created July 30, 2011 05:50
OS X HUD Panel in Pure CSS3
<!-- http://bobjr.ru/hud/simulator.html -->
<div id="window">
<div id="title">
<div id="close"></div>
Applied Styles
</div>
<div id="content">
<div class="row odd"></div>
@lightyrs
lightyrs / gist:1108708
Created July 27, 2011 04:52
lion rails 3 setup
# 2011-07-25
#
# Mac OS X 10.7
# Xcode 4.1
# Install Lion.
# Xcode
# Download Xcode from Mac App Store.
@lightyrs
lightyrs / gist:1074343
Created July 10, 2011 06:59 — forked from jjb/gist:996510
How to set the certificate file for Net::HTTP library-wide

In my previous post I described how to securely acquire the Mozilla list of root certificates and convert them to a form usable by curl and various libraries which don't ship with them.

Next, I want to point Net:HTTP at this file library-wide, so that it is used by all invocations of methods accessing https resources (in particular, Kernel#open, which in ruby 1.8.7 does not have a ca_file option and is therefore unusable with https). I hunted around the ruby standard library for a couple hours and came up with this:

require 'openssl'
require 'open-uri'
require 'net/https'

module Net
@lightyrs
lightyrs / fql.rb
Created July 7, 2011 02:33
A Minimalist Facebook FQL Client in Ruby
require "rubygems"
require "open-uri"
require "rack/utils"
require "json"
class Fql
class << self
attr_accessor :base_url
end
@lightyrs
lightyrs / hex.js
Created June 13, 2011 16:32
Generate Hex Useable Hex Code
var char = "✓";
"&#x" + char.charCodeAt(0).toString(16) + ";";
@lightyrs
lightyrs / normalize.css
Created June 8, 2011 17:46
Normalize CSS
/* =============================================================================
HTML5 element display
========================================================================== */
/*
* Add display for block-level HTML5 elements
* Addresses display not defined in IE6/7/8/9 & FF3
*/
article,
@lightyrs
lightyrs / shiny_buttons.css
Created June 8, 2011 17:39
Normalize CSS3 Buttons
.button:hover, .button:focus, .button:active {
text-decoration: none;
color: white;
background: #569107;
}
.button:active {
}
@lightyrs
lightyrs / perfect_buttons.css
Created May 28, 2011 03:37
active_admin CSS3 Buttons
.button a {
box-shadow: 0 1px 2px #aaaaaa;
-moz-box-shadow: 0 1px 2px #aaaaaa;
-webkit-box-shadow: 0 1px 2px #aaaaaa;
background: #838a90;
background: -webkit-gradient(linear, left top, left bottom, from(#838a90), to(#414549));
background: -moz-linear-gradient(-90deg, #838a90, #414549);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#838a90, endColorstr=#414549);
-ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#838a90, endColorstr=#414549);
-webkit-border-radius: 200px;
@lightyrs
lightyrs / defaults.css
Created May 27, 2011 22:40
Sensible CSS Defaults
/*
html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
v1.4 2009-07-27 | Authors: Eric Meyer & Richard Clark
html5doctor.com/html-5-reset-stylesheet/
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,