Skip to content

Instantly share code, notes, and snippets.

@tsunokawa
tsunokawa / wc_hdfs
Created November 7, 2016 09:51 — forked from abicky/wc_hdfs
execute a command like wc to data on HDFS
#!/bin/bash
condition=""
fs="\t"
while getopts c:F: OPT; do
case $OPT in
c ) condition=$OPTARG;;
F ) fs=$OPTARG;;
esac
@tsunokawa
tsunokawa / memcached2redis.php
Created November 1, 2016 03:11 — forked from nmmmnu/memcached2redis.php
Memcached 2 Redis wrapper
<?
/*
=========================
Memcached 2 Redis wrapper
=========================
Version 1.0.1, CopyLeft 2011.AUG.11
@tsunokawa
tsunokawa / 0_reuse_code.js
Created March 20, 2014 06:17
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
@tsunokawa
tsunokawa / couchbasedumpkeys.php
Last active December 19, 2015 11:19
Couchbaseダンプファイルからキー一覧を取り出すスクリプト
<?php
// Couchbaseダンプファイルからキー一覧を取り出すスクリプト
//
// 使い方
// php couchbasedumpkeys.php /tmp/bucket-test/node-10.0.0.1%3A8091/data-0000.cbb /tmp/allkey.txt
//
// 第1引数:ダンプファイル
// 第2引数:出力ファイル名
@tsunokawa
tsunokawa / checkmemcached.pl
Created July 3, 2013 06:29
LVS Memcached Check Command Script
#!/usr/bin/env perl
use strict;
use warnings;
## yum install perl-Cache-Memcached.noarch perl-String-Random.noarch
use Cache::Memcached;
use String::Random;