Skip to content

Instantly share code, notes, and snippets.

@krusynth
krusynth / Kru_MultitileEvents.js
Created May 2, 2017 01:49
A plugin for RPG Maker MV to allow multitile events, instead of the 1x1 tile events that are the default.
//=============================================================================
// Multitle Events
// Version: 1.0.0
//=============================================================================
var Imported = Imported || {};
Imported.Kru_MultitileEvents = "1.0.0";
//=============================================================================
/*:
* @plugindesc 1.0.0 Allows for events that are bigger than 1 tile.
*
@krusynth
krusynth / github-team.py
Last active August 7, 2021 03:54
Python script to add all GitHub repositories to an organization team - permission is set to push. You'll need a settings.py file with your organization name and API key. Based off of my GitHub stats script (requirements.txt here): https://github.com/krues8dr/project-migration
#!/usr/bin/python
# Exports a CSV of repo names, readme files, and the license of the project.
from __future__ import print_function
import requests
import json
import settings
from urlparse import urlparse, parse_qs
import sys

Install NRPE and the necessary plugins.

CentOS/Fedora/RHEL

sudo yum install nrpe nagios-plugins nagios-plugins-all

Ubuntu/Debian

sudo apt-get install nagios-nrpe-server nagios-plugins

@krusynth
krusynth / list.blade.php
Last active August 22, 2017 16:27
Hack to use Ajax to rehash all mods in Technic Solder. Replaces app/views/mod/list.blade.php
@extends('layouts/master')
@section('title')
<title>Mod Library - TechnicSolder</title>
@stop
@section('content')
<div class="page-header">
<h1>Mod Library</h1>
</div>
<div class="panel panel-default">
<div class="panel-heading">
@krusynth
krusynth / gorky.txt
Created August 17, 2015 23:26
Maxim Gorky's Reminiscences of Leo Tolstoy
"You hammer away like a parrot at one word, freedom, freedom; but what is the sense of it? If you attained your freedom, what do you imagine would happen? In the philosophic sense, a bottomless void, and in actual life you would become an idler, a parasite. If you were free in your sense, what would bind you to life or to people? Now, birds are free, but still they build nests; you, however, wouldn't even build a nest, but would gratify your sexual feeling anywhere, like a dog. You think seriously, and you will come to see, you will come to feel, that this freedom is ultimately emptiness, boundlessness... Christ was free and so was Buddha, and both took on themselves the sins of the world and voluntarily entered the prison of earthly life. Further than that nobody has gone, nobody. And you—we—well, what's the good of talking—we are all looking for freedom from obligations towards our fellow men, whereas it is just that feeling of our obligations which has made us men, and, if those obligations were not there,
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
@krusynth
krusynth / example.php
Created June 7, 2015 21:54
Use Wordpress login system on a custom PHP page.
/**
* Example of php code using Wordpress' login.
*/
require_once '../pages/wp-blog-header.php';
// If the user is not authorized, redirect to the Wordpress login.
auth_redirect();
// Your code here
#!/bin/bash
#
# solr APACHE SOLR 4.10
#
# chkconfig: 2345 85 15
# description: Startup Script for APACHE SOLR 4.10
#
# processname: solr
@krusynth
krusynth / date-query.txt
Created May 12, 2015 13:52
Handling multifield dates. Please don't do this. It's bad - unmanageable, unreadable.
mysql> desc testdates;
+-------+----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+----------------------+------+-----+---------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| year | smallint(5) unsigned | YES | | NULL | |
| month | tinyint(3) unsigned | YES | | NULL | |
| day | tinyint(3) unsigned | YES | | NULL | |
+-------+----------------------+------+-----+---------+----------------+

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post