Skip to content

Instantly share code, notes, and snippets.

View Tschrock's full-sized avatar

Tyler Schrock Tschrock

  • Progressive
  • Ohio, USA
  • 11:40 (UTC -04:00)
View GitHub Profile
@Tschrock
Tschrock / PocketmineReferance.md
Last active August 29, 2015 14:04
PocketMine Plugin Referance

Config files:

###Generic Config File###

  1. Make a config.yml file
  2. Put it in the /resources folder
  3. Add
$this->saveDefaultConfig();
$this->reloadConfig();
@Tschrock
Tschrock / checkMojangStatus.sh
Created July 30, 2014 06:21
A simple bash script to check status.mojang.com and print out the server statuses (in color!)
#!/bin/bash
CM_STATUS_JSON=$(curl -s https://status.mojang.com/check)
CM_STATUS_TEXT=$(echo "$CM_STATUS_JSON" | grep -o -P "{.*?}" | sed -e "s/\(\"\|{\|}\)//g" -e "s/\:/: /g")
CM_STATUS_COLORED=$(echo "$CM_STATUS_TEXT" | sed -e 's/\://g' \
-r -e 's/([^ ]*) (.* )?(.*$)/\3 \1/' \
-e "s/green /$(echo -e '\033[0;32m')/" \
-e "s/red /$(echo -e '\033[0;31m')/" \
@Tschrock
Tschrock / snano
Created July 30, 2014 07:10
Some shell scripts to make my life easier.
#!/bin/bash
if [[ -w $1 ]]; then
nano $@
else
sudo nano $@
fi
@Tschrock
Tschrock / downloadCrashReports.sh
Last active August 29, 2015 14:04
Some scripts to maintain and search a personal archive of pocketmine crash reports.
#!/bin/bash
showHelp() {
echo 'Options:
-d DIRECTORY download to a specific directory
(defaults to ~/Documents/pocketmineCrashes)
-h show this help.'
}
@Tschrock
Tschrock / packagePlugin.sh
Created July 30, 2014 20:23
Some stuff for developing Pocketmine plugins
#!/bin/bash
#
# This needs to be set to the Plugin's server directory!!
#
PP_ServerDirectory="/home/tyler/pocketmine/1.4plugdev"
# Just some options for cleaning up before we package.
@Tschrock
Tschrock / 1_ThinkpadTwist_Ubuntu14.04.md
Last active July 18, 2020 20:47
Installing Ubuntu 14.04 on a Thinkpad Twist (s230u)

Installing Ubuntu 14.04 on a Thinkpad Twist (s230u)

Input device information

  • Touchscreen
    • 'Atmel Atmel maXTouch Digitizer'
    • Touch mode: direct
    • Max number of touches: 16

Button and Key identifiers

"No... I mean, yes... or, actually, kind of.",
"... think he's up to the task, maybe... but... but... <sub>no.</sub>",
"Oh you poor poor little baby.",
"Now this might hurt for juuust a second.",
"Oh, well, better late than never, right?",
"Lets go! || ...Um, lets, not?",
"How dare you? HOW. DARE. YOU?!",
"Now what do you have to say for yourself? I Said, What do you have to say for yourself!?",
"I don't wanna talk about it.",
"Oh, I'm sorry. Uh, am I interupting?",

PicartoChatBot Permissions

The permissions system allows you to control who has access to run commands and make changes to configuration settings.

#Basics

###Permission Ids Each permission object has a unique id. While technically this id could be anything (minus spaces), its recommended they be in the format type.name. For example, the command to set a timeout, !settimeout, uses the permission cmd.settimeout to determine who is allowed to set a timeout's duration. Plugins may also opt to use permissions for other abilities as well, such as using a timeout.bypass permission to allow a person to bypass a timeout or even using a permissions object to filter who is included in a raffle.

###Permission Levels/Ranks

Preview lava/email without page styles messing with things:

{% capture html %}
  <Content here>
{% endcapture %}
<iframe style="width: 100%; height: 800px;" srcdoc="{{html | Escape}}"/>

Commas in single/multi select attributes:

  1. Use &amp;comma;
@Tschrock
Tschrock / PicartoAPI.md
Last active November 28, 2023 07:11
Documentation for Picarto.tv's API endpoints

The Picarto API

This is unofficial documentation for Picarto.tv's service APIs. I'm not responsible for anything you do with this information; it is provided as is with no guarantees.

==== UPDATE 4/16/2017 ====

It looks like there is an official well-documented api now: https://docs.picarto.tv/api/ Please use that instead!

==========================