Skip to content

Instantly share code, notes, and snippets.

View Caffe1neAdd1ct's full-sized avatar
💻
Working on multiple projects

Kevin Andrews Caffe1neAdd1ct

💻
Working on multiple projects
View GitHub Profile
@Caffe1neAdd1ct
Caffe1neAdd1ct / eve-online-install.md
Last active January 26, 2024 05:40
Eve Online with Wine and Arch Linux

EveOnline Install for Arch Linux

There are a few different configurations depending on your laptop/desktop and harware due to some driver and software issues. Personally I've setup a prefix per DX/VK configuration and installed EVE Online inside each one for testing purposes.

Install

Packages

Firstly install the required libraries (will require checking the 64bit option in the EVE Online launcher settings, the vulkan libraries are only needed if you intend to use DXVK and Vulkan conversions from DX9/DX11 (see Wine Tricks section later on):

@Caffe1neAdd1ct
Caffe1neAdd1ct / mailhog-install.sh
Last active August 25, 2023 21:11
Installation of MailHog on CentOS 7
## Install packages
sudo yum install wget curl vim epel-release
sudo yum install daemonize.x86_64
## Install mailhog
wget https://github.com/mailhog/MailHog/releases/download/v0.2.0/MailHog_linux_amd64
sudo chmod +x MailHog_linux_amd64
sudo chown root:root MailHog_linux_amd64
sudo mv MailHog_linux_amd64 /usr/sbin/mailhog
@Caffe1neAdd1ct
Caffe1neAdd1ct / template.sh
Created October 21, 2021 09:01 — forked from warlord0/template.sh
Bash Script Template
#!/bin/bash
EXAMPLE="example default"
# Plugin variable description
PROGNAME=$(basename $0)
RELEASE="Revision 1.0.0"
AUTHOR="(c) 2020 Warlord0"
# Functions plugin usage
@Caffe1neAdd1ct
Caffe1neAdd1ct / gist:cf9f600bfe77d5a6edf4c4c495740fcb
Created August 17, 2021 20:56
Apache Reverse Proxy to PHP InBuilt Webserver with SSL
<VirtualHost *:443>
ServerName app.host.local
ServerAdmin root@localhost
DocumentRoot "/srv/http/"
<Directory "/srv/http/">
Options -Indexes -FollowSymLinks -MultiViews
AllowOverride All
@Caffe1neAdd1ct
Caffe1neAdd1ct / alert.sh
Created March 15, 2021 23:53
Colourful Slack Notification In Bash
#!/bin/bash
## Slack Alert Helper
function send_slack_message() {
action="$1"
status=$2
message="$3"
case "$status" in
success ) color="#44d058";;
@Caffe1neAdd1ct
Caffe1neAdd1ct / php-mysqlnd-fix-add.patch
Created November 9, 2020 19:04
PHP 5.6 Patches for aur build mysqlnd bug
diff --git a/php-mysqlnd-fix.patch b/php-mysqlnd-fix.patch
new file mode 100644
index 0000000..1cadcb3
--- /dev/null
+++ b/php-mysqlnd-fix.patch
@@ -0,0 +1,22 @@
+--- a/ext/mysqlnd/mysqlnd_ps_codec.c 2019-01-09 09:54:13.000000000 +0000
++++ b/ext/mysqlnd/mysqlnd_ps_codec.c 2020-11-05 15:21:00.238585270 +0000
+@@ -911,7 +911,7 @@
+ zend_uchar *p = stmt->execute_cmd_buffer.buffer,
@Caffe1neAdd1ct
Caffe1neAdd1ct / huion.sh
Created July 8, 2020 22:32
HUION INSPIROY Q11K V2 startup script
#!/bin/sh
#Set to specific monitor name, based on the output from command: xrandr
MONITOR="DP-1"
PAD_NAME='HUION Huion Tablet Pad pad'
STYLUS_NAME='HUION Huion Tablet Pen stylus'
# Get all device IDs for the PAD_NAME - in case multiples are present for wired and wireless connections
padIDs=$(xinput --list | awk -v search="$PAD_NAME" \
'$0 ~ search {match($0, /id=[0-9]+/);\
@Caffe1neAdd1ct
Caffe1neAdd1ct / image.py
Created July 3, 2020 22:22
Counts background pixels in an image
#!/usr/bin/env python
from PIL import Image
image = Image.open("image.jpg")
bg = image.getpixel((0,0))
width, height = image.size
bg_count = next(n for n,c in image.getcolors(width*height) if c==bg)
img_count = width*height - bg_count
img_percent = img_count*100.0/width/height
print(img_percent)
@Caffe1neAdd1ct
Caffe1neAdd1ct / ComposerIdeHelperNetbeans.php
Last active June 25, 2020 10:57
Laravel IDE Helper Netbeans
<?php
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem as File;
/**
* Modify Generated IDE Helper Files for compatibility with NetBeans
*/
class ComposerIdeHelperNetbeans extends Command
{
WITH RECURSIVE materials_list as (
SELECT
1 as n,
produces_names.typeID as produces_id,
produces_names.typeName as produces_name,
materials.quantity as produces_qty,
materials.materialTypeID as material_id,
materials.quantity as material_qty,
material_names.typeName as material_name
FROM invTypeMaterials as materials