Skip to content

Instantly share code, notes, and snippets.

View actual-indentation.jsx
** Indented using the TM command 'Indent Selection' (opt + cmd + [)
import BodyClassName from 'react-body-classname';
import DocumentTitle from 'react-document-title';
import generateDocumentTitle from 'components/lib/pageDisplay';
import React from 'react';
function MyComponent() {
const componentClass = 'my-component';
ravasthi / .eslintrc.json
Last active May 2, 2018
eslint-plugin-import issue 238 configuration
View .eslintrc.json
"parser": "babel-eslint",
"extends": "airbnb",
"plugins": [
"rules": {
"indent": ["error", 4],
View macvim.rb
require 'formula'
class Macvim < Formula
homepage ''
url ''
version '7.3-66'
sha1 'd11696f7089688fa96a45fc57410c60f6ca5a394'
head '', :branch => 'master'
ravasthi / loadFixture.js
Last active Jan 3, 2016 — forked from mavenlink/loadFixture.js
Update original to use jQuery.ajax instead of jasmine.XmlHttpRequest. It should play better with jasmine 2.0.
View loadFixture.js
var uniqueLoadIndicator = null;
// Loads fixure markup into the DOM as a child of the jasmine_content div
spec.loadFixture = function(fixtureName) {
var $destination = $('#jasmine_content');
uniqueLoadIndicator = null;
var indicatorScript = "<script>uniqueLoadIndicator = 'loaded';</s" + "cript>";
// get the markup, inject it into the dom
$destination.html(spec.fixtureHtml(fixtureName) + indicatorScript);
ravasthi / index.html
Created Feb 6, 2013
The story thus far…
View index.html
<!DOCTYPE html>
<style type="text/css" media="screen">
color: midnightBlue;
ravasthi / postmore.rb
Created Feb 15, 2012
Adding "read more" to Jekyll
View postmore.rb
module Jekyll
module PostMore
def postmorefilter(input, url, text)
m = /(?<morestring><!--\s*more\s*-->)/.match(input)
if m
input.split(m[:morestring]).first + "<p class=\"more\"><a href=\"#{url}\">#{text}</a></p>"
ravasthi / _config.yml
Created Feb 15, 2012
Multiple authors on Jekyll
View _config.yml
name: Hanzou Hattori
display_name: Hanzou
gravatar: c66919cb194f96c696c1da0c47354a6a
twitter: company
github: hhattori
ravasthi / Rakefile
Created Feb 14, 2012
Jekyll Rakefile modifications
View Rakefile
require "rubygems"
require "rake"
require "fileutils"
SOURCE = "."
'themes' => File.join(SOURCE, "_includes", "themes"),
'layouts' => File.join(SOURCE, "_layouts"),
'posts' => File.join(SOURCE, "_posts"),
'post_ext' => "md"
View favicon.html
<!-- Favicons and touch icons -->
<!-- For retina-display iPads -->
<link href="/assets/images/apple-touch-icon-xlarge.png" rel="apple-touch-icon-precomposed" sizes="144x144" type="image/png"/>
<!-- For retina-display iPhones -->
<link href="/assets/images/apple-touch-icon-large.png" rel="apple-touch-icon-precomposed" sizes="114x114" type="image/png"/>
<!-- For iPad 1 -->
<link href="/assets/images/apple-touch-icon-medium.png" rel="apple-touch-icon-precomposed" sizes="72x72" type="image/png"/>
<!-- For iPhone 3G, iPod Touch and Android -->
<link href="/assets/images/apple-touch-icon-small.png" rel="apple-touch-icon-precomposed" type="image/png"/>
<!-- For Nokia -->
ravasthi / markup.html
Created Dec 6, 2011
Add retina graphics to your website
View markup.html
<div id="page">
<a class="home" href="/"><div class="logo">&nbsp;</div></a>
<a class="gallery" href="gallery.html">Gallery</a>
<a class="pricing" href="pricing.html">Pricing</a>
<a class="contact" href="">Contact</a>
</div> <!-- /#page -->