Skip to content

Instantly share code, notes, and snippets.

View RedactedProfile's full-sized avatar
🍁
Web & Game Developer

Kyle Harrison RedactedProfile

🍁
Web & Game Developer
View GitHub Profile
@RedactedProfile
RedactedProfile / .dockerignore
Created February 2, 2024 01:31
Minimal C++20 with Module support for Linux, using Docker DevContainer
.git
!.gitkeep
.vs
.clion
.idea
bin
obj
Makefile
*.make
/llvm.sh
@RedactedProfile
RedactedProfile / main.cpp
Created June 23, 2020 11:22
3DSage Make Your Own Raycaster Game source
#include <stdio.h>
#include <stdlib.h>
#include <GL\glew.h>
#include <GL\freeglut.h>
#include <math.h>
#define PI 3.1415926535
#define PI6 PI*2
#define PI2 PI/2
#define PI3 3*PI2

Keybase proof

I hereby claim:

  • I am redactedprofile on github.
  • I am kytech (https://keybase.io/kytech) on keybase.
  • I have a public key ASB9kKf9X9X6LpxAWdMW8VoiR6MLmlPQHrj37SyVCllzDQo

To claim this, I am signing this object:

@RedactedProfile
RedactedProfile / README.md
Last active October 27, 2015 21:46
Ultimate Referrer Blacklist | Automatic Nginx Converter

In an effort to help stop spam referrals from even entering your website, might as well just catch them and send them to a 403 or something.

There is a blacklist file available from perishablepress.com found here ultimate-referrer-blacklist.txt.

This file is useful, but it presents exactly one problem: It's in pseudo .htaccess. It's meant to be copied from and pasted into an .htaccess file. Because there also exists a huge list of url patterns that comprises of about 90% of the txt that isn't .htaccess. This is also not useful at all in any shape nor form as is to servers using Nginx who wish to make use of this list (like me).

What I have done is written a generic PHP script that downloads the file, runs through each line, and converts it into an nginx directive. The intent here is to run this file, and dump the output somewhere else on the server, in this case a new file called blacklist.conf located in the core /etc/nginx

@RedactedProfile
RedactedProfile / commands.md
Created October 20, 2015 19:27 — forked from ondrej-kvasnovsky/commands.md
Commands to install and configure ElasticSearch on Ubuntu

Install ElasticSearch and Java

1  wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb
2  sudo dpkg -i elasticsearch-1.0.1.deb
3  sudo update-rc.d elasticsearch defaults 95 10
4  sudo add-apt-repository ppa:webupd8team/java
5  sudo apt-get update
6  sudo apt-get install oracle-java7-installer
7  java -version
@RedactedProfile
RedactedProfile / 00. tutorial.md
Created October 13, 2015 18:16 — forked from maxivak/00. tutorial.md
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
@RedactedProfile
RedactedProfile / routes:index.js
Last active February 16, 2024 02:08
CKEditor File Upload with Node and Express
var express = require('express');
var router = express.Router();
var multipart = require('connect-multiparty');
var multipartMiddleware = multipart();
router.get('/', function(req, res) {
res.render('index');
});
#!upstart
description "MyApp"
author "MyApp by charlie"
env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
respawn
start on runlevel [23]
stop on shutdown
@RedactedProfile
RedactedProfile / subscribe_service.php
Created July 18, 2014 18:58
PHPList API Service Script
<?php
/* subscribe_service.php --
Purpose: Remote List Control via HTTP, subscribe function
Original Author: Rich Cowan, 8/8/05
Modified by: Jesse Heap 1/3/2006 : http://forums.phplist.com/viewtopic.php?f=7&t=3252
Modified by: Chad Phillips 1/11/2012 : http://forums.phplist.com/viewtopic.php?f=7&t=3252&start=30
Modified by: Kyle Harrison 7/18/2014 : http://forums.phplist.com/viewtopic.php?f=7&t=3252&start=30
Notes: - Changed success found string to match default installation. Was always returning false otherwise.
@RedactedProfile
RedactedProfile / bitly.class.php
Created December 20, 2011 18:52 — forked from saundersalex/gist:1502719
Bitly API Class
<?php
/*
* ----------------------
* bitly.class.php
* ----------------------
*
* Bitly class used for calling all the different API functions provided by the Bitly API.
*
* Author: Alex Saunders