Skip to content

Instantly share code, notes, and snippets.

<script defer type="text/javascript" src="/assets/fbai.js">
@ricn
ricn / comments.js.jsx
Created July 30, 2014 23:08
comments.js.jsx
/** @jsx React.DOM */
var Comment = React.createClass({
render: function () {
return (
<div className="comment">
<h2 className="commentAuthor">
{this.props.author}
</h2>
{this.props.comment}
</div>

Keybase proof

I hereby claim:

  • I am ricn on github.
  • I am ricn (https://keybase.io/ricn) on keybase.
  • I have a public key ASCK97GTlzSqp6Fyip_LjcAVUM3EitY6wqccCTVAR1tkbAo

To claim this, I am signing this object:

@ricn
ricn / cmis.rb
Last active December 21, 2015 21:58
require 'cmis'
require 'rika'
atom_url = "http://localhost:8080/alfresco/cmisatom"
user = "admin"
password = "admin"
session = CMIS::create_session(atom_url, user, password)
root = session.root_folder
image_folder = root.create_cmis_folder("Images")
@ricn
ricn / nginx.conf
Last active December 19, 2015 23:59
worker_processes 5;
events {}
http {
upstream database {
postgres_server 127.0.0.1 dbname=test user=ricn password=mypass;
}
server {
listen 8080;
server_name localhost;
var Vue = require('vue')
new Vue({
el: '#app',
data: {
message: 'Hello Vue.js!'
}
});
@ricn
ricn / 0_reuse_code.js
Created December 3, 2015 21:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
=PROGRESS REPORT==== 9-Nov-2015::22:39:02 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.175.0>},
{id,alarm_handler},
{mfargs,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 9-Nov-2015::22:39:02 ===
# Migration
defmodule Bookmarks.Repo.Migrations.CreateBookmark do
use Ecto.Migration
def change do
create table(:bookmarks) do
add :href, :string, null: false, size: 2000
add :title, :string
add :description, :text
add :tags, {:array, :string}
<project>
...
<profiles>
<profile>
<id>qa</id>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>