Skip to content

Instantly share code, notes, and snippets.

@leonroy
leonroy / sysbench-fileio.sh
Created May 16, 2021 14:10
Sysbench script to measure random I/O
#!/bin/bash
# Set to 2x RAM
FILE_TOTAL_SIZE="32G"
#Set to long enough to complete several runs
MAX_TIME="240"
#For random IO set to 4K otherwise set to 1M for sequential
FILE_BLOCK_SIZE="4K"
@leonroy
leonroy / EndpointIntegrationTest.java
Created May 27, 2020 13:41
EndpointIntegrationTest from Brring
package com.boxpeg.brring.server.api;
import com.boxpeg.brring.server.api.error.ErrorConstants;
import com.boxpeg.brring.server.common.exception.ForbiddenException;
import com.boxpeg.brring.server.common.exception.ResourceAlreadyExistsException;
import com.boxpeg.brring.server.common.exception.ResourceNotFoundException;
import com.boxpeg.brring.server.config.Constants;
import com.boxpeg.brring.server.mail.verification.EmailVerificationService;
import com.boxpeg.brring.server.security.AuthoritiesConstants;
import com.boxpeg.brring.server.telephony.call.CallPropertyKeys;
@leonroy
leonroy / mergeGitRepositories.sh
Last active August 21, 2017 17:43
Modification of the excellent mergeGitRepositories script by *eitch* to handle Git 2.13
#!/bin/bash
#
################################################################################
## Script to merge multiple git repositories into a new repository
## - The new repository will contain a folder for every merged repository
## - The script adds remotes for every project and then merges in every branch
## and tag. These are renamed to have the origin project name as a prefix
##
## Usage: mergeGitRepositories.sh <new_project> <my_repo_urls.lst>
## - where <new_project> is the name of the new project to create
@leonroy
leonroy / ssh-hp1920-enable-cmdline-mode.exp
Created May 29, 2016 13:09
SSH to HP 1920 and enable cmdline-mode
#!/usr/bin/expect -f
set timeout 60
set host [lindex $argv 0]
stty -echo
send_user -- "Password for $host: "
expect_user -re "(.*)\n"
send_user "\n"
stty echo
set password $expect_out(1,string)
@leonroy
leonroy / Things to CSV.scpt
Last active April 11, 2022 08:33
Convert Things database to CSV. This script produces two CSVs on the user's Desktop. One for todos and the other for projects. It requires that Things.app is installed.
---------
-- Convert Things (from Cultured Code) database to CSV
-- https://culturedcode.com/things/
--
-- Version 1.0
--
-- This script produces two CSVs on the user's Desktop. One for todos and the other for projects.
-- It requires that Things.app is installed.
--
-- Things todos and projects can be tied either using the project name in the todos CSV or better