Skip to content

Instantly share code, notes, and snippets.

@yrsegal
yrsegal / extension.css
Created October 3, 2019 20:43
A simple set of code for user-defined js browser extensions, to make Scryfall Tagger show full cards instead of just art in search.
.search-results-grid--item .illustration .frame {
padding-bottom: 136% !important;
}
.illustration .frame {
overflow: visible !important;
}
@yrsegal
yrsegal / TestBlocks.java
Last active December 30, 2018 01:10
block creation code
package team.chisel.ctm;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.ColorHandlerEvent;
import net.minecraftforge.client.event.ModelRegistryEvent;
package command.items
import com.teamwizardry.librarianlib.features.base.ModCreativeTab
import com.teamwizardry.librarianlib.features.base.item.ItemMod
import com.teamwizardry.librarianlib.features.helpers.ItemNBTHelper
import com.teamwizardry.librarianlib.features.helpers.nonnullListOf
import com.teamwizardry.librarianlib.features.kotlin.nbt
import com.teamwizardry.librarianlib.features.utilities.client.TooltipHelper
import net.minecraft.entity.Entity
import net.minecraft.entity.player.EntityPlayer
@yrsegal
yrsegal / makeb.sh
Last active January 10, 2016 23:07 — forked from Vazkii/_makeb.bat
1.8 JSON Model/Blockstate autogenerators - ported to sh by WireSegal
#!/bin/sh
# Vazkii's JSON creator for blocks
# Ported to sh by WireSegal
# Put in your /resources/assets/$MODID/models/block
# Makes basic block JSON files as well as the acossiated item and simple blockstate
# Can make multiple blocks at once
#
# Usage:
# makeb (block name 1) (block name 2) (block name x)
@yrsegal
yrsegal / nbt.py
Last active January 4, 2016 02:42
A multiplatform command-line nbt editor - mostly by texelelf - dependencies found here https://www.mediafire.com/?27jujfrgaj9ss96
#!/usr/bin/python
import sys
import os
import re
import pyperclip
from copy import deepcopy
if sys.platform == "win32":
import tempfile
temppath = os.path.join(tempfile.gettempdir(),"NBT_Filter_Temp.txt")
else:
@yrsegal
yrsegal / proofofconcept.1cc
Created September 1, 2015 00:29
A proof of concept for a 10hz (or theoretically, (20/x)hz) clock in github.com/destruc7i0n/OneCommand format.
# Arbitrary definitions. Honestly, these could be whatever you wanted.
DEFINE: arbitraryname name
DEFINE: arbitraryobjective objective
# Required to set up the clock.
INIT: scoreboard objectives add $arbitraryobjective dummy
# An example of a 2 tick clock (aka 10hz), done by using conditional repeats.
# This command will remain constant no matter the tickspeed.
scoreboard players add $arbitraryname $arbitraryobjective 1
@yrsegal
yrsegal / colortest.py
Created August 22, 2015 07:41
prints all term256 colors out. if you chmod +x it, it will run as an executable file.
#!/usr/bin/python
from __future__ import print_function
import argparse, sys
parser = argparse.ArgumentParser()
parser.add_argument("-f", "--flat", help="Print without blocking", dest="flat",
action="store_true")
args = parser.parse_args()
mainbase = "\033[38;5;{}m"
{
"time": 1800,
"notifytime": 60
}
# coding=utf-8
basenoun = [ "%n-worshipping cult", "%n %ver",
"alien", "animal", "ant", "apple", "asshole", "ball", "band",
"bear", "bee", "bird", "boob", "book", "breast", "boat", "boy",
"bro", "car", "cat", "centaur", "clown", "communist", "cop", "corpse",
"crab", "crime", "dad", "desk", "dick", "dog", "dinosaur",
"disgrace", "doctor", "dong", "door", "dragon", "duck", "dude",
"eel", "egg", "failure", "father", "fire", "flag", "flower", "friend",
"frog", "game", "gamer", "gender", "giraffe", "girl", "goat",
import shitpost
import tweepy
import time
import json
import os
import sys
TWITTER_CONSUMER_KEY = ""
TWITTER_CONSUMER_SECRET = ""
TWITTER_ACCESS_KEY = ""