This file contains hidden or 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
package io.github.chrisruffalo.pintle.resolution.resolver; | |
import java.util.*; | |
/** | |
* Randomly iterates through a list. This class is not thread | |
* safe. This is a lot more efficient than the following: | |
* <pre> | |
* final List<T> copy = new ArrayList(source); | |
* Collections.shuffle(copy); |
This file contains hidden or 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
[user@host]$ curl -o top-1m.csv.zip http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip | |
[user@host]$ unzip top-1m.csv.zip | |
[user@host]$ awk -F "\"*,\"*" '{print $2}' top-1m.csv > top-1m.list |
This file contains hidden or 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
############################################################################################################### | |
# Author: Chris Ruffalo <[email protected]> | |
# | |
# ------------------------------------------------------------------------------------------------------------- | |
# Description: | |
# ------------------------------------------------------------------------------------------------------------- | |
# In some situations in CFME automation it is necessary to access a resource that does not | |
# support shared access. This code was initially developed to work with a web API that could | |
# return the same result to multiple workflows and end up with virtual machines having identical | |
# properties where they should've been unique. |
This file contains hidden or 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 | |
POSTGRES_USER=guac | |
POSTGRES_PASS=guac | |
POSTGRES_DB=guac | |
# create storage for postgres container | |
NEW_VOLUME=false | |
if [[ "" == $(docker volume ls | grep guac-postgres-volume) ]]; then | |
printf "Creating a new volume for guac-postgres...\n" |
This file contains hidden or 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
# require rbvmomi, should be installed already because it is used by CFME | |
require 'rbvmomi' | |
# todo: input options/dialog values/etc | |
data_center = "RHC-DC-VMware" | |
folder_path = "test_folder/test_folder/test_folder2" | |
# todo: possibly validate to make sure folder_path doesn't start with '/' and/or if it does remove it | |
# determine full path .. the "vm" is because it is a vm folder |
This file contains hidden or 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
# generate private key | |
openssl genrsa -aes256 -out fqdn.key 2048 | |
# generate certificate signing request for key | |
openssl req -new -key fqdn.key -out fqdn.csr | |
# sign request and generate x509 out (public key) | |
openssl x509 -req -days 1095 -in fqdn.csr -signkey fqdn.key -out fqdn.crt | |
# import keys into p12 package |
This file contains hidden or 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
#!/usr/bin/perl -w | |
use File::Basename; | |
use IMDB::Film; | |
use XML::Writer; | |
use IO::File; | |
use String::Util qw(trim); | |
@files = (<*.avi>, <*.mkv>, <*.mp4>); | |
@suffixlist = (".avi", ".mkv", ".mp4"); |
This file contains hidden or 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
// create variable | |
function ClickerCheat() { | |
// external settings | |
this.enabled = false; // enabled at all | |
this.build = true; // should it build things? | |
this.click = true; // should it click on the big cookie? | |
this.golden = true; // should it auto-click golden cookies? | |
this.upgrade = true; // should it upgrade when available? | |
this.interval = 1; // ms between 'clicks' |