Skip to content

Instantly share code, notes, and snippets.

View ayan4m1's full-sized avatar

Andrew DeLisa ayan4m1

View GitHub Profile
#!/usr/bin/perl
use strict;
my $steamPath = "C:\\Steam\\steamcmd";
my $loginCmd = "+login anonymous";
my $quitCmd = "+quit";
my $games = {
'DirectoryUnderRoot' => SteamAppId
@ayan4m1
ayan4m1 / gist:591c83edb9c38e219acf
Last active August 29, 2015 14:06
Compiling sensu-em on Windows
  1. Get the 64-bit Ruby 2.x installer and the 64-bit DevKit for 2.x from http://rubyinstaller.org/downloads/
  2. Install Ruby, run the DevKit extractor and follow its README to add the DevKit to your Ruby install and PATH
  3. Grab the 64-bit OpenSSL knapsack package from http://packages.openknapsack.org/openssl/openssl-1.0.0i-x64-windows.tar.lzma - extract to C:\openssl\
  4. Run rake -rdevkit to create a makefile, compile and test the native code
  5. From here you can use gem build

Notes:

  • The 64-bit versions of Ruby, the Ruby DevKit, and the OpenSSL package can be replaced with the 32-bit versions as long as they are consistent.
  • test_bad_server hangs indefinitely for me on win 8.1 x64.
@ayan4m1
ayan4m1 / httpdsite
Created May 28, 2015 00:59
CentOS HTTPD Site Manager
#!/bin/bash
### httpdensite --- Bash script to enable or disable a site in httpd.
### Author: ayan4m1 <[email protected]>
### Based on nginx_ensite by author: António P. P. Almeida <[email protected]>
### Permission is hereby granted, free of charge, to any person obtaining a
## copy of this software and associated documentation files (the "Software"),
### to deal in the Software without restriction, including without limitation
@ayan4m1
ayan4m1 / hsv2rgb.java
Created November 23, 2015 01:53
hsv2rgb for libGDX
private final static float ONE_THIRD = 1/3f;
private final static float TWO_THIRDS = 2/3f;
/**
* Converts a vector of hue, saturation, and value into a vector of red, green, and blue
*
* @param hsv {@code com.badlogic.gdx.Vector3}, X set to hue (0-360), Y to saturation (0-1), and Z to value (0-1)
* @return {@code com.badlogic.gdx.Color}
*/
private Color hsv2rgb(Vector3 hsv) {
@ayan4m1
ayan4m1 / update-ark-mods.pl
Created March 1, 2017 20:34
Looks in an ARK dedicated server install config for active mods and uses steamcmd to update them
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use Config::IniFiles;
use IO::CaptureOutput qw/capture/;
# Absolute path to steamcmd.sh/exe
@ayan4m1
ayan4m1 / INSTALL.md
Last active July 23, 2017 21:20
Forge Install Guide
  1. Download http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.12-14.21.1.2420/forge-1.12-14.21.1.2420-installer-win.exe
  2. Run the installer, select Install Client, uncheck Mercurius, hit Install.
  3. Download http://phreak.space/modpack-2017-07-23.zip
  4. Open %appdata%.minecraft\mods - rename it to mods-old.
  5. Copy the JARs contained in the modpack zip to %appdata%.minecraft\mods (create dir if it doesn't exist)
  6. Run Minecraft launcher
  7. Click green arrow next to the Play button, select the forge-1.12 profile, then click Play
  8. Add a server with address "phreak.space:25566"
  9. If you want to go back to vanilla, run the Minecraft launcher, click the green arrow to the right of the Play button and select MC 1.12 (not Forge)
@ayan4m1
ayan4m1 / SETUP.md
Last active May 15, 2019 02:31
Setup of a CentOS 7 install for Pterodactyl development

Basic system provisioning

sudo su

yum remove -y iwl*-firmware

yum install -y epel-release

yum update -y

@ayan4m1
ayan4m1 / package.direct.json
Last active November 3, 2018 23:19
Sample package.json files for install-peers
{
"name": "install-peers-test",
"version": "0.1.0",
"description": "",
"main": "index.js",
"author": "ayan4m1 <[email protected]>",
"license": "MIT",
"dependencies": {
"react": "^16.6.0"
},
// ==UserScript==
// @name Average allocation in Rally
// @namespace https://rally1.rallydev.com/
// @version 0.1
// @description Find the average allocation from the Team Status page of Rally
// @author ayan4m1 <[email protected]>
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// @require https://gist.githubusercontent.com/BrockA/2625891/raw/waitForKeyElements.js
// @match https://rally1.rallydev.com/
// @grant none
@ayan4m1
ayan4m1 / BUILDING-RDM.md
Last active February 2, 2023 01:00
How to build Redis Desktop Manager - https://github.com/uglide/RedisDesktopManager

Redis Desktop Manager for Windows

Yes, it's been done already. No, it's still not particularly easy. You do not need to use either Qt Creator or VS2015.

I am building on information found here, here, and here. Thanks to these folks and the contributors to RDM.

With this document, I sought to "trim the fat" from these other guides and prove that VS2015 itself was not in fact necessary - just its tooling.

Prerequisites