Skip to content

Instantly share code, notes, and snippets.

View toc21c's full-sized avatar
🏠
Working from home

0x323143 toc21c

🏠
Working from home
View GitHub Profile
#!/bin/bash
HOSTNAME=$(hostname)
DATE=$(date "+%Y%m%d-%H%M%S")
# iozone variables
output_path="/root/st_measure/iozone/iscsi_plain_direct_io_${HOSTNAME}"
file_size="256m"
#!/bin/bash
HOSTNAME=$(hostname)
DATE=$(date "+%Y%m%d-%H%M%S")
# iozone variables
output_path="/root/st_measure/iozone/iscsi_plain_${HOSTNAME}"
file_size="256m"
#!/bin/bash
# by atalntis@wisetodd.com
# Description :
# 1. sd로 시작되는 disk 정보에 대해서만 dd를 한다.
# 2. 만일 sda1, sda2식으로 이루어진 subpartition은 skip한다.
# 3. 아래의 disk 초기화는 sda ~ sdz까지로 제한한다.
#INPUTFILE=/proc/diskstats
#!/bin/bash
# cache construct variables
CACHE_DEV="/dev/sdb"
#SOURCE_DEV="/dev/sdd"
SOURCE_DEV="/dev/sdc"
CACHE_NAME="test-dmc"
# cache device whole size(byte)
CACHE_DEV_SZ=$(blockdev --getsize64 ${CACHE_DEV})
SOURCE_DEV_SZ=$(blockdev --getsize64 ${SOURCE_DEV})
#!/usr/bin/env perl
srand(time());
$randletter = "(int (rand (26)) + (int(rand(1) + .5)% 2?65:97))";
$salt = sprintf("%c%c",eval$randletter,eval$randletter);
$plaintext =shift;
#!/bin/bash
MIDW_BIN="/usr/local/middleware/bin"
PATCH_FILE="patch_daemon.tar.gz"
# get daemon list
shopt -s nullglob
psd_array=($MIDW_BIN/*_psd)
bsd_array=($MIDW_BIN/*bsd)
#!/bin/sh
rm -rf cscope.files cscope.files
find . \( -name '*.c' -o -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.s' -o -name '*.S' \) -print > cscope.files
cscope -i cscope.files
@toc21c
toc21c / strtol.c
Last active August 29, 2015 13:59
#include <stdlib.h>
#include <limits.h>
#include <stdio.h>
#include <errno.h>
int
main(int argc, char *argv[])
{
int base;
char *endptr, *str;
alias actags="ctags --c++-kinds=+p --fields=+iaS --extra=+q --tag-relative=yes -R"
#!/usr/bin/perl
# Simple perl script to list files with a given CVS tag
# Created 2002/09/10 ec
# $Id: lstag,v 1.1 2002/09/26 10:02:53 ec Exp $
use strict;
$::VERSION = "1.0";
$::cvs_ID = '$Id: lstag,v 1.1 2002/09/26 10:02:53 ec Exp $'; #'