Skip to content

Instantly share code, notes, and snippets.

@redfit
redfit / index.html
Created July 27, 2014 08:58
d3 on angularjs directive
<!doctype html>
<html ng-app="d3bar">
<head>
<meta charset="UTF-8">
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.17/angular.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"></script>
</head>
<body ng-controller="MyCtrl">
<cr-d3-bars data='myData'></cr-d3-bars>
<script>
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@redfit
redfit / gist:6608333
Created September 18, 2013 12:16
カレーのレシピ
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>カレーのレシピ</title>
</head>
<body>
<header>
<h1>カレーのレシピ</h1>
<p>誰でもできる、美味しいカレーの作り方です。旦那も息子もこのカレーが大好物。</p>
@redfit
redfit / skype
Created June 7, 2013 07:45 — forked from orangain/skype
#!/bin/bash
#
# Init file for daemonized Skype service
#
### BEGIN INIT INFO
# Provides: skype
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
@redfit
redfit / compile_ruby_on_centos.sh
Created August 16, 2012 16:39 — forked from masa-ita/compile_ruby_on_centos.sh
Compile Ruby 1.9.3 on CentOS 5 from source files
#!/bin/bash
# install packages needed to compile ruby
sudo yum -y install make gcc-c++ zlib-devel openssl-devel \
readline-devel gdbm-devel bison \
libffi-devel wget
# you should register EPEL repository to install libyaml
sudo rpm -Uvh http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm
sudo yum -y install libyaml-devel
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz