Skip to content

Instantly share code, notes, and snippets.

View rtircher's full-sized avatar

Renaud Tircher rtircher

  • Coinhako
  • Singapore
View GitHub Profile

Install OS X 10.10 Yosemite in VirtualBox

(based on this pastebin i've found via Google, markdownified and adjusted to work with the official Yosemite release)

Yosemite's first developer preview was released right after Monday's WWDC opening keynote. For the general public, an open beta will be available to download later this summer. However, for those who want a sneak peek at the new hotness, there is a way to safely install it without risking your machine, using the free and powerful VirtualBox application from Oracle.

(LEGAL DISCLAIMER: This guide aims to explain how to create a virtual machine on a regularly purchased Apple computer, running a genuine Mac OS X operating system, for testing purposes only.)

@rtircher
rtircher / S3QueryStringAuthenticationBuilder
Created September 12, 2013 03:31
Generate authenticated url for S3 in ruby
class S3QueryStringAuthenticationBuilder
def initialize(bucket, access_key, secret_key)
@bucket = bucket
@access_key = access_key
@secret_key = secret_key
end
def build_query_string_authentication(file_url, time_to_live=1.minute)
file_url = "/#{file_url}" unless file_url.start_with?('/')
@rtircher
rtircher / clearfix.css
Created May 30, 2013 13:03
Ensure float elements indicate their size to the parent div. Add the clearfix class to the parent div
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.clearfix {display: inline-block;}
// PhantomJS doesn't support bind yet
Function.prototype.bind = Function.prototype.bind || function (thisp) {
var fn = this;
return function () {
return fn.apply(thisp, arguments);
};
};
(function(p) {
var fs = require('fs'),
@rtircher
rtircher / div-vertical-horizontal-center.css
Created March 8, 2013 18:11
Center a div vertically and horizontally
.table {
display: table;
}
.center-vertically {
display: table-cell;
vertical-align: middle;
width: 100%;
height: 100%;
}
@rtircher
rtircher / known-size-rotate
Created June 26, 2012 17:29 — forked from matthewcopeland/known-size-rotate
rotate the text of a known-sized element.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Renaud rotates</title>
<!-- always start with a css reset because browsers are evil -->
<link rel="stylesheet" type="text/css" href="https://raw.github.com/matthewcopeland/css/master/reset.css" />
<style>
.container {
position: absolute;
@rtircher
rtircher / center rotate unknown
Created June 26, 2012 17:29 — forked from matthewcopeland/center rotate unknown
rotate an unknown element and center
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Renaud rotates</title>
<!-- always start with a css reset because browsers are evil -->
<link rel="stylesheet" type="text/css" href="https://raw.github.com/matthewcopeland/css/master/reset.css" />
<style>
html, body {
@rtircher
rtircher / hello.rb
Created February 1, 2012 21:09
Hello world!
puts "Hello World!"