Skip to content

Instantly share code, notes, and snippets.

@PanickedKernel
PanickedKernel / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@PanickedKernel
PanickedKernel / InvTweaksTree
Last active December 20, 2015 03:39
A customized InvTweaksTree.txt for the Hexxit modpack (technicpack.com)
<?xml version="1.0" encoding="utf-8" ?>
<!--
|==============================================================|
| INVENTORY TWEAKS Mod - By Jimeo Wan (jimeo.wan at gmail.com) |
| Tree configuration |
|==============================================================|
# Q: WHAT IS THIS?
# A: This file is used to store all the keywords you can use to create item rules, but also to define the items order.
# You can move/change all that you want, but it's recommended not to delete any default item.
@PanickedKernel
PanickedKernel / minecraft_premium.rb
Last active December 15, 2015 17:29
A function within my user model validates against the minecraft API.
def minecraft_premium
require 'open-uri'
url = "https://minecraft.net/haspaid.jsp?user="
minecraft_validation_url = url + minecraft_username
is_username_premium = open(minecraft_validation_url).read
errors.add(:minecraft_username, minecraft_username + " is not a premium minecraft account") unless is_username_premium == "true"
end

Nginx + Unicorn for Rails on Rackhub

Description:

This script enables you to launch your Rails application in production environment (port:80) with Nginx and Unicorn.

Installation:

Please make sure that your Gemfile in your rails application includes unicorn.

@PanickedKernel
PanickedKernel / crash-2013-03-28-server
Created March 28, 2013 14:20
Minecraft crash log
---- Minecraft Crash Report ----
// I'm sorry, Dave.
Time: 3/28/13 10:04 AM
Description: Ticking memory connection
java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.fastRemove(ArrayList.java:441)
at java.util.ArrayList.remove(ArrayList.java:424)
at ix.sendThisChunkToPlayer(PlayerInstance.java:78)