Skip to content

Instantly share code, notes, and snippets.

@cliffwoo
cliffwoo / 44.go
Created January 12, 2013 02:49 — forked from srid/44.go
// Exercise: Loops and Functions - http://tour.golang.org/#44
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
// Copyright 2011 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
package guestbook
import (
"http"
"io"
"os"
require 'date'
author = "Saito"
email = "saitowu@gmail.com"
date = Date.new(2012, 7, 30)
s = %w{
. . . . . . .
. . o o o . .
. o . . . . .

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@cliffwoo
cliffwoo / rmcomment.pl
Created November 17, 2013 09:41
Remove comments and empty lines from source code
#!/usr/bin/perl
undef $/;
$text = <>;
$text =~ s/\/\/[^\n\r]*(\n\r)?//g;
$text =~ s/\/\*+([^*]|\*(?!\/))*\*+\///g;
$text =~ s/\n+/\n/g;