Skip to content

Instantly share code, notes, and snippets.

import React, { PropTypes } from 'react';
import { Router } from 'react-router';
class App extends React.Component {
static contextTypes = {
router: PropTypes.object
}
static propTypes = {
history: PropTypes.object.isRequired,
console.log('OKOK1');
define('timeline', ['jquery/nyt', 'underscore/nyt'], function($, _) {
console.log('OKOK2');
var ok = _.random(0, 100);
console.log('OKOK', ok);
$('.shell').html(ok);
});
calculateUrl: function(){
var original_location = window.location.href;
var has_slide_param = original_location.match(/slide=/);
var has_name_param = original_location.match(/name=/);
var has_query_param = original_location.match(/\?/);
var guid = this.collection.get(this.current_page)[0].guid,
new_url;
if(has_slide_param){
new_url = original_location.replace(/slide=[^&$]+/,"slide="+guid);
NAME
irbtab
DESCRIPTION
irbtab allows you to copy and paste from irb arrays to a spreadsheet (tab delimited)
it works on osx, linux and possibly windows.
SYNOPSIS
0) install the gem
get '/*' do
@settings = JSON.parse(File.read(settings_path))
file_path = File.join(File.dirname(@settings['promo_src']),params[:splat] )
puts "OKOK:#{file_path}"
if File.exists?(file_path)
data = File.open(file_path, 'rb') { |f| f.read }
return [200,{"Content-type" => "text/css"},data]
end
end
speakers:{
president_obama:{
image_url: 'http://graphics8.nytimes.com/images/2012/10/04/us/thumbs-candidates/thumbs-candidates-custom1.jpg'
}
}
[
{ "keys": ["ctrl+shift+."], "command": "erb" },
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+shift+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"} },
{ "keys": ["ctrl+r"], "command": "reveal_in_side_bar" },
{ "keys": ["super+alt+i"], "command": "reindent" }
]
<ul class ="refer">
<li>
<a href=""></a>
</li>
</ul>
{
"font_size": 15.0,
// The number of spaces a tab is considered equal to
"tab_size": 2,
// Set to true to insert spaces when tab is pressed
"translate_tabs_to_spaces": true,
class ApplicationController < ActionController::Base
protect_from_forgery
end