Skip to content

Instantly share code, notes, and snippets.

View Decicus's full-sized avatar
💻

Alex Thomassen Decicus

💻
View GitHub Profile

Keybase proof

I hereby claim:

  • I am Decicus on github.
  • I am decicus (https://keybase.io/decicus) on keybase.
  • I have a public key whose fingerprint is 195E 01D9 780C 1A5F 8CFC 7D12 86EC 494F 639D ABEF

To claim this, I am signing this object:

@Decicus
Decicus / TSA2-0.md
Last active July 5, 2016 10:38
Twitch Subscriber Area 2.0

Sooner or later, this will become so filled with code it needs to be rewritten to be more modular and developer-friendly. This should become 2.0 and here are my main ideas for it.

  • Revamp how multiple streamers are handled.
    • Currently if you're subscribed to one streamer, you get access to all posts. This is intentional behavior, but I would also like to support per-streamer subscriber areas. So there is one shared one between all streamers and one dedicated for each streamer. (Possibly also add the possibility of sharing a subscriber area between some streamers, but not all. Not really something I think is that useful though).
  • Change from procedural MySQLi to PDO interface for MySQL. Prepared statements and whatnot.
  • Revamp moderators and administrators. Change who does what, possibly add another "root" level of who can manage administrators.
  • Implement theme support.
    • If I stick to using Bootstrap, make it easier to change the theme.
  • [Edit: January 17th 2015] - Add support using Bo
@Decicus
Decicus / TwitchPrime.css
Last active October 2, 2016 20:48
Makes Twitch Prime badges white on purple instead of white on lightblue (BTTV-only)
@-moz-document url-prefix("https://www.twitch.tv/") {
.twitch-premium-1 {
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NUYxNjIxREY4OEJCMTFFNjkzQTZGOEEyMEQwMjE5NTciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NUYxNjIxRTA4OEJCMTFFNjkzQTZGOEEyMEQwMjE5NTciPiA8eG1
@Decicus
Decicus / object.json
Last active November 30, 2016 18:18
Twitch broadcaster language codes - November 2016
{
"en": "English",
"zh": "中文",
"ja": "日本語",
"ko": "한국어",
"es": "Español",
"fr": "Français",
"de": "Deutsch",
"it": "Italiano",
"pt": "Português",
@Decicus
Decicus / Plain.json
Last active March 23, 2017 08:35
The available Twitch OAuth scopes listed in different formats - (Source: https://dev.twitch.tv/docs/authentication/#scopes)
[
"user_read",
"user_blocks_edit",
"user_blocks_read",
"user_follows_edit",
"channel_read",
"channel_editor",
"channel_commercial",
"channel_stream",
"channel_subscriptions",
[
{
"keys": ["ctrl+q"],
"command": "toggle_comment",
"args": {
"block": "false"
}
},
{
"keys": ["alt+1"],
@Decicus
Decicus / font_awesome.rb
Last active March 9, 2018 15:19 — forked from 23maverick23/font_awesome.rb
Jekyll: Font Awesome icons Liquid tag
##
# The MIT License (MIT)
#
# Copyright (c) 2014 Ryan Morrissey
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@Decicus
Decicus / setmulti_with_kadgar.md
Last active July 12, 2018 01:52
Miscellaneous Nightbot commands using variables

Usage

!setmulti <streams> where <streams> is just the channel names for the ones you're streaming with, separated by a space between every channel.

Command

!commands add -a=!commands !setmulti edit !multi http://kadgar.net/live/$(channel)/$(eval const streams = '$(query)'.split(" ");streams.join("/");)

@Decicus
Decicus / Roll.md
Last active October 9, 2018 19:04
Nightbot evals and stuff

Usage

!roll will default to 🎲 USERNAME rolled NUMBER 🎲 where USERNAME will be the username/nickname of the user and NUMBER is a random number between 1-20.

!roll Hello world, this is a test. will turn into 🎲 Hello world, this is a test. rolled NUMBER 🎲. Where NUMBER is a random number between 1-20.

Command

!commands add !roll $(eval const q = decodeURIComponent(`$(querystring)`); let input = q !== '' ? q : `$(user)`;`🎲 ${input} rolled ${Math.floor(Math.random() * (20 - 1 + 1)) + 1} 🎲`)

@Decicus
Decicus / convars.json
Last active January 4, 2019 15:44
TTT Server Convars (ttt.badking.net)
{
"ttt_preptime_seconds": {
"default": "30",
"description": "The length of the preparation phase that occurs after players spawn in and\nbefore traitors are selected and a new round begins. Specified in seconds."
},
"ttt_firstpreptime": {
"default": "60",
"description": "The length of the preparation phase for only the first round after a map loads. It is useful to make this higher than ttt_preptime_seconds so that players do not have to sit out a round just because they loaded slightly too slowly."
},
"ttt_posttime_seconds": {