Skip to content

Instantly share code, notes, and snippets.

@jinyeow
jinyeow / bspwmrc
Last active November 7, 2022 13:30
Config files related to bspwm and panel (lemonbar)
#!/bin/zsh
ws1= # main
ws2= # web
ws3= # mail
ws4= # code
ws5= # math [infinity]  (term icon)
ws6= # media
ws7= # misc  (9 squares icon)
ws8= # notes/docs  (pdf icon)
/*
* Copyright (c) 2015. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package com.empireminecraft.util.serialization;
import com.empireminecraft.util.Util;
package co.ryred.rybot;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
/**
* Created by rissa on 01/07/2015.
@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
@satreix
satreix / custom_archlinux_live_USB.md
Last active July 28, 2024 20:02
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

@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

@aadnk
aadnk / PlayerDisplayModifier.java
Last active November 6, 2024 14:27
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;
@graywolf336
graywolf336 / BukkitSerialization.java
Last active February 16, 2025 15:51
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);
@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 {
@aadnk
aadnk / Ability.java
Last active November 6, 2024 14:25
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 {
/**