Skip to content

Instantly share code, notes, and snippets.

@menski
menski / .Xresources
Created March 23, 2012 23:59
Xresources for urxvt terminal with tango theme
! Cursor theme
xcursor.theme: Vanilla-DMZ
! URxvt config
URxvt*termName: rxvt-16color
URxvt.scrollBar: off
URxvt.font: xft:monaco:size=10:antialias=true
URxvt.internalBorder: 0
URxvt*selectToClipboard: true
@mbostock
mbostock / .block
Last active March 1, 2024 06:07
The Gist to Clone All Gists
license: gpl-3.0
@aadnk
aadnk / Cooldowns.java
Last active January 31, 2022 07:38
A very simple cooldown library.
package com.comphenix.example;
import org.bukkit.entity.Player;
import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table;
public class Cooldowns {
private static Table<String, String, Long> cooldowns = HashBasedTable.create();
@aadnk
aadnk / Ability.java
Last active December 4, 2018 17:03
A simple cooldown system with charges.
package com.comphenix.example;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.bukkit.entity.Player;
public class Ability {
/**
@Compressions
Compressions / Cooldown.java
Created July 23, 2013 05:35
Utility class for creating dynamic cooldowns with the Bukkit API
package us.compressions.example;
import java.util.HashMap;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
public class Cooldown {
@graywolf336
graywolf336 / BukkitSerialization.java
Last active June 1, 2024 14:21
Serialize and deserialize the player's inventory, including armor and content.
/**
* Converts the player inventory to a String array of Base64 strings. First string is the content and second string is the armor.
*
* @param playerInventory to turn into an array of strings.
* @return Array of strings: [ main content, armor content ]
* @throws IllegalStateException
*/
public static String[] playerInventoryToBase64(PlayerInventory playerInventory) throws IllegalStateException {
//get the main content part, this doesn't return the armor
String content = toBase64(playerInventory);
@aadnk
aadnk / PlayerDisplayModifier.java
Last active April 25, 2024 22:44
Change the display name and skin of any player. Credit to @bigteddy98, @ferrybig and @lenis0012 for writing the original version.
package com.comphenix.example;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
@Signifies
Signifies / resources.md
Last active May 28, 2022 20:49
Programming resources for beginners.

CREATED BY Signifies

Updated as of 02/01/19

Compiled a list of sites for information on Programming

This document was created to help spread the knowledge of programming and to increase the academic understanding of Computer Science while informing the masses that programming is for- all people no matter their age, where they live, ETC.

Java Resources

@satreix
satreix / custom_archlinux_live_USB.md
Last active March 15, 2024 10:32
Custom Arch Linux live USB

Custom Arch Linux live USB

Setup

Install the dependencies for the archiso package:

(root): pacman -S make squashfs-tools libisoburn dosfstools patch lynx devtools git

I recommend archiso getting them from git, there is a package in the repositories, however, at this time of writing, it will not work with the instructions below. So, grab the most recent version from git and install it:

(user): git clone git://projects.archlinux.org/archiso.git && cd archiso

@johnhamelink
johnhamelink / papajohns.rb
Created March 28, 2015 21:23
Ruby CLI Client for Papa Johns' API
require 'rubygems'
require 'bundler/setup'
require 'faraday'
require 'pry'
require 'json'
@conn = Faraday.new(url: 'https://api.papajohns.co.uk') do |faraday|
faraday.adapter Faraday.default_adapter
end