This file contains 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
public static Random random = new Random(DateTime.Now.Millisecond); | |
public int chooseWithChance(params int[] args) | |
{ | |
/* | |
* This method takes number of chances and randomly chooses | |
* one of them considering their chance to be choosen. | |
* e.g. | |
* chooseWithChance(1,99) will most probably (%99) return 1 since index of 99 is 1 | |
* chooseWithChance(99,1) will most probably (%99) return 0 since index of 99 is 0 | |
* chooseWithChance(0,100) will always return 1. |
This file contains 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
if [ $# -ne 3 ] | |
then | |
echo "This script generates random file names with random contents" | |
echo "USAGE : $0 [prefix] [size] [count]" | |
echo " prefix : prefix of file name to be generated" | |
echo " size : size of the file eg. 2048, 100k, 13M" | |
echo " count : number of files to be generated" | |
echo "EXAMPLE:" | |
echo " $0 tmp 10k 3" | |
echo " will generate 3 files having size of 10 KBytes each and named something like:" |
This file contains 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
#!/bin/bash | |
if [ $# -eq 0 ] | |
then | |
echo "This script generates linux users which CAN NOT login to shell but CAN change his/her password with SSH." | |
echo "It is ideal to have those type of users if you are using softwares using OS authentication (eg. IBM DB2)" | |
echo "USAGE : $0 {username} " | |
echo " username : prefix of file name to be generated" | |
echo "EXAMPLE:" | |
echo " $0 " | |
echo "Author: Ramazan POLAT - [email protected]" |
This file contains 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
#!/bin/sh | |
# Copyright (c) 1995-2004 SUSE Linux AG, Nuernberg, Germany. | |
# | |
# Author: Andreas Schneider <[email protected]> | |
# | |
# /etc/init.d/mongodb | |
# and its symbolic link | |
# /(usr/)sbin/rcmongodb | |
# | |
# Template system startup script for some example service/daemon mongodb |
This file contains 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
# mongo.conf | |
dbpath = /data/db | |
#port = 27017 | |
# | |
#where to log | |
logpath = /var/log/mongodb.log | |
logappend = true | |
rest = true |
This file contains 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
# tokud.conf | |
dbpath = /data/mx | |
port = 37017 | |
# | |
#where to log | |
logpath = /var/log/tokumx.log | |
logappend = true | |
rest = true |
This file contains 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
START_DATE=`date` | |
SOURCE_DIR=/RMData/lbosdata/00001/ | |
DEST_DIR=/RMData_new/lbosdata/00001/ | |
echo "Source Dir:$SOURCE_DIR" | |
echo "Destination Dir:$DEST_DIR" | |
read -p "Press any key to continue, CTRL+C to break ..." | |
cd $SOURCE_DIR | |
DIRS=`find ./ -type d | tail -n 100 | sort` |
This file contains 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
public class MoUtils | |
{ | |
private static readonly Random random = new Random(); | |
public DataTable MergeDataTable(DataTable dt1, DataTable dt2) | |
{ | |
DataTable dtMerged = new DataTable(); | |
foreach (DataColumn dc in dt1.Columns) | |
{ | |
dtMerged.Columns.Add(dc.ColumnName, dc.DataType); |
This file contains 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
<link rel="import" href="../topeka-elements/category-images.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<link rel="import" href="../topeka-elements/category-icons.html"> | |
<polymer-element name="my-element"> | |
<template> |
This file contains 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
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |
OlderNewer