Recently, I needed to extract a number of directories from a git project each into their own projects. The original directory structure looked like
project/
subprojects/
Foo/
Bar/
Baz
#!/bin/bash | |
path="/var/www/sites/htdocs/wp-content/themes/vip/"; | |
git_path="https://username:password@mdashti.com/DBToaster/"; | |
git_array=( plugins pmc-variety pmc-plugins ); | |
git_path_array=("${git_array[@]}") | |
function generateRandomString(length) { | |
var randomString = '' | |
while (randomString.length < length) { | |
randomString += Math.random().toString(20).slice(2, length); | |
if (randomString.length > length) return randomString.slice(0, length); | |
} | |
return randomString; | |
}; | |
function generateRandomInt(min, max) { // min and max included |
#!/bin/bash | |
#This script creates a mongodb sharded cluster in a single server | |
#This cluster can be used for testing and development task and never recommended for production environment :) | |
#MongoDB sharded cluster has 2 shards for test environment | |
#Author Pranab Sharma <pranabksharma@gmail.com> | |
#Create the data directories | |
echo "Creating data directories" | |
mkdir -p /data/a0 | |
mkdir -p /data/a1 |
#!/usr/bin/env bash | |
set -e | |
# This script will start three shards, a config server and a mongos, all on the current machine. | |
# | |
# It was written for Mongo 3.4, based on https://docs.mongodb.com/manual/tutorial/deploy-shard-cluster/ | |
# | |
# This script is only for testing purposes. In production, you would run each of these servers on a different machine. | |
# | |
# The first time you run it, pass this variable for the initial setup: |
/* | |
* Copyright (c) 2009-2017, Farooq Mela | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* 1. Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* 2. Redistributions in binary form must reproduce the above copyright |
# use this command to split a file into multiple pages | |
gsplit -l 7100 -d lineitem.tbl lineitem.tbl.part |
Recently, I needed to extract a number of directories from a git project each into their own projects. The original directory structure looked like
project/
subprojects/
Foo/
Bar/
Baz
package com.example.controller; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.Date; | |
import java.util.List; | |
import java.util.ArrayList; | |
import java.util.Map; | |
import java.util.HashMap; |