Skip to content

Instantly share code, notes, and snippets.

View martincr's full-sized avatar

martincr martincr

View GitHub Profile
@martincr
martincr / HTML5 Layout
Created April 5, 2011 14:05
Basic layout using HTML5 layout elements
<!doctype html>
<html>
<head>
<title>Page title</title>
</head>
<body>
<header>
<h1>Page title</h1>
</header>
<nav>
@martincr
martincr / Include Blueprint CSS
Created April 8, 2011 20:24
Basic blueprint-css include
<link rel="stylesheet" href="css/blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="css/blueprint/print.css" type="text/css" media="print">
<!--[if lt IE 8]>
<link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection">
<![endif]-->
@martincr
martincr / Double quotes using Haml with Sinatra
Created April 12, 2011 00:25
To avoid the daft single quotes in Haml, include this line in your main.rb file and restart your server
set :haml, :attr_wrapper => '"'
@martincr
martincr / gist:a9ccfff96ba3285a684e
Last active December 16, 2015 10:39
Preferences.sublime-settings
{
"auto_complete": true,
"auto_complete_commit_on_tab": false,
"auto_complete_delay": 50,
"auto_complete_selector": "source - comment",
"auto_complete_size_limit": 4194304,
"auto_complete_triggers":
[
{
"characters": "<",
@martincr
martincr / gist:5500012
Last active December 16, 2015 21:29
Links for tips on setting up Sublime Text 2.
NSArray *foods = @[@"tacos", @"burgers"];
NSLog(@"%@", (*foods description);
@martincr
martincr / gist:8463613
Created January 16, 2014 21:17
PostgreSQL Cheat Sheet
PostgreSQL Cheat Sheet
======================
CREATE DATABASE
CREATE DATABASE dbName;
CREATE TABLE (with auto numbering integer id)
CREATE TABLE tableName (
id serial PRIMARY KEY,
name varchar(50) UNIQUE NOT NULL,
#!/usr/bin/env ruby
#
# Convert blogger (blogspot) posts to jekyll posts
#
# Basic Usage
# -----------
#
# ./blogger_to_jekyll.rb feed_url
#
# where `feed_url` can have the following format:
@martincr
martincr / gist:f1b59e7b68232817b2c9
Last active August 29, 2015 14:01
Third-party Jekyll importer for Jekyll
ruby blogspot_to_jekyll.rb http://{blogspot}/feeds/posts/default?max-results=300 --verbose
{
"Version":"2012-10-17",
"Statement":[{
"Sid":"AddPerm",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::example.com/*"
]
}