Skip to content

Instantly share code, notes, and snippets.

View Caffe1neAdd1ct's full-sized avatar
:octocat:
Crafting something new..

Kevin Andrews Caffe1neAdd1ct

:octocat:
Crafting something new..
View GitHub Profile
@Caffe1neAdd1ct
Caffe1neAdd1ct / create.sh
Created December 11, 2015 16:22
Creating git repos via git-shell chsh configuration
#!/bin/bash
# If no project name is given
if [ $# -lt 2 ]
then
# Display usage and stop
echo "Usage: create project-name.git \"Description of repo\"";
exit 1;
fi
@Caffe1neAdd1ct
Caffe1neAdd1ct / list.sh
Created December 11, 2015 16:27
Github list command for chsh git-shell users
#!/bin/sh
cd ~
ls -1d *.git
@Caffe1neAdd1ct
Caffe1neAdd1ct / sassc.bat
Last active February 17, 2016 16:50
Sassc with Netbeans Css Preprocessors run on save
##
# Strips out --cache-location from netbeans sass command which isn't supported by sassc
# Avoiding installing ruby for a plain html project and use Visual Studio 2015 and C++ libs to compile self contained sassc.exe
##
@echo off
set RESTVAR=
shift
:loop1
if "%2"=="" goto after_loop
@Caffe1neAdd1ct
Caffe1neAdd1ct / aur.sh
Created March 4, 2016 13:19
AUR helper script
#!/bin/bash
OPTIND=1
AUR="https://aur.archlinux.org/"
INSTALL="0"
UPDATE="0"
PURGE="0"
REINSTALL="0"
NAME="0"
@Caffe1neAdd1ct
Caffe1neAdd1ct / sassc.sh
Last active September 5, 2016 15:39
Sassc compatibility with Netbeans 8.1
#!/bin/bash
declare -a ARGS
for var in "$@"; do
# Ignore known bad arguments
if [ "$var" = '--cache-location' ] || [ "$var" = '--debug-info' ]; then
continue
fi
ARGS[${#ARGS[@]}]="$var"
done
@Caffe1neAdd1ct
Caffe1neAdd1ct / router.php
Last active March 16, 2016 14:28
Router for Drupal 8 when using PHP InBuilt Webserver in Development
<?php
$file = pathinfo($_SERVER["SCRIPT_FILENAME"]);
$mimeTypes = [
'css' => 'text/css',
'js' => 'application/javascript',
'jpg' => 'image/jpg',
'png' => 'image/png',
'map' => 'application/json',
@Caffe1neAdd1ct
Caffe1neAdd1ct / RconDao.php
Created June 20, 2016 08:39
Minecraft DAO for Rcon
<?php
/**
* Description of RconDao
* @author kandrews
*/
class Minecraft_Model_RconDao
{
const PACKET_AUTH_FAILURE = -1;
@Caffe1neAdd1ct
Caffe1neAdd1ct / router.php
Last active October 6, 2017 09:31
Router for CakePHP 1.3
<?php
$path = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
// If the file exists then return false and let the server handle it
if (file_exists($_SERVER["DOCUMENT_ROOT"] . $path)) {
return false;
} else {
/** makes the /manage/ area work */
if ($_SERVER["SCRIPT_FILENAME"] === $_SERVER["DOCUMENT_ROOT"] . DIRECTORY_SEPARATOR . 'index.php') {
$_SERVER['SCRIPT_NAME'] = '/';
@Caffe1neAdd1ct
Caffe1neAdd1ct / gist:6c63b44616746ec11594ac6aa3058076
Last active August 8, 2016 11:19
Owncloud PHP-FPM Redirect Loop Script Name Bug
The problem:
1) owncloud runs fine with apache 2.2 and finds itself in the environment
REQUEST_URI /index.php/apps/files
SCRIPT_NAME /index.php
PATH_INFO /apps/files
PATH_TRANSLATED /srv/www/htdocs/apps/files
PHP_SELF /index.php/apps/files
2) owncloud does not run with apache 2.4 maybe due to a different environment from mod-fpm
@Caffe1neAdd1ct
Caffe1neAdd1ct / eve-online-install.md
Last active September 4, 2024 15:06
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):