This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.cooldaemon.scalaz_test | |
import scalaz._ | |
import scalaz.concurrent._ | |
object TryConcurrent { | |
import Scalaz._ | |
import java.lang.Thread.currentThread | |
def run { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.scalatest.fixture.FixtureFunSuite | |
import scala.concurrent.stm._ | |
import scala.concurrent.ops._ | |
class CancelSuite extends FixtureFunSuite { | |
case class F(cb: CommitBarrier, ref: Ref[String]) | |
type FixtureParam = F | |
def withFixture(test: OneArgTest): Unit = test(F( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -O http://scala-tools.org/repo-releases/org/scala-tools/scala-stm_2.8.1/0.2/scala-stm_2.8.1-0.2.jar | |
fsc -classpath ./scala-stm_2.8.1-0.2.jar SampleForSTM3.scala | |
scala -classpath .:./scala-stm_2.8.1-0.2.jar SampleForSTM3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** zencoding.vim.org 2010-07-09 12:07:33.000000000 +0900 | |
--- zencoding.vim 2010-07-09 20:00:47.000000000 +0900 | |
*************** | |
*** 2131,2134 **** | |
--- 2131,2143 ---- | |
return [[line("'<"), col("'<")], [line("'>"), col("'>")]] | |
endfunction | |
+ function g:get_zen_snippets_list(type) | |
+ let type = a:type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Encode; | |
use Net::Twitter; | |
use Term::ANSIColor; | |
use Readonly; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% rabbitmq-server -detached | |
% perl test.pl | |
% rabbitmqctl list_connections pid | |
Listing connections ... | |
<[email protected]> | |
...done. | |
% rabbitmqctl close_connection "<[email protected]>" "go away" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(acc). | |
-author('[email protected]'). | |
-export([test/1]). | |
sum1([]) -> 0; | |
sum1([X | XS]) when is_number(X) -> X + sum1(XS); | |
sum1([_X | XS]) -> sum1(XS). | |
sum2([], Acc) -> Acc; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(fold). | |
-author('[email protected]'). | |
-export([test/1]). | |
test(Max) -> | |
lists:map( | |
fun (F) -> | |
benchmark(fun () -> | |
F(fun (N, Acc) -> N + Acc end, 0, lists:seq(1, Max)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef rabbitmqctl | |
typeset -A opt_args | |
local context state line | |
_arguments : \ | |
"*:argument:(stop stop_app start_app reset force_reset cluster status rotate_logs close_connection add_user delete_user change_password list_users add_vhost delete_vhost list_vhosts set_permissions clear_permissions list_permissions list_user_permissions list_queues list_exchanges list_bindings list_connections list_channels list_consumers)" \ | |
&& return 0 | |
return 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "DDXML.h"; | |
#import "DDXMLNode+HTML.h" | |
#import "DDXMLDocument+HTML.h" |