Skip to content

Instantly share code, notes, and snippets.

View timcole's full-sized avatar
🦄

Timothy Cole timcole

🦄
View GitHub Profile
@timcole
timcole / AppConfig.java
Created December 11, 2017 16:36
Social Blade Android App Config
package com.socialblade.droid.statistics.app;
public class AppConfig {
private static String URL_ROOT = "https://api.socialblade.com/v2/";
public static String URL_RESET = "https://socialblade.com/forgotpw?sentemail=1";
public static String URL_LOGIN = URL_ROOT + "bridge";
public static String URL_REGISTER = URL_ROOT + "auth/register";
public static String URL_GUEST_REGISTER = URL_ROOT + "auth/guest";
public static String URL_FAVOURITES = URL_ROOT + "favorites/list";
public static String URL_FAVOURITE_CHECK = URL_ROOT + "favorites/check";
@-moz-document url("https://github.com/Urgo?tab=repositories&q=SocialBlade") {
.h-card,
.UnderlineNav,
.col-9 .position-relative div:first-child {
display: none;
}
.container-lg {
max-width: 80% !important;
}
package chatters
import (
"bytes"
"encoding/json"
"io/ioutil"
"net/http"
"os"
"fmt"
)
.chat-header {
padding: 16px 15px;
}
.chat-title {
font-size: 14px;
}
#chat-messages {
font-family: "Dank Mono";
@timcole
timcole / keybase.md
Last active March 25, 2019 23:26
keybase.md

Keybase proof

I hereby claim:

  • I am timothycole on github.
  • I am modesttim (https://keybase.io/modesttim) on keybase.
  • I have a public key ASAvJ_a2NROBCn_ZqsXp9oVSRF38gaSQao7XASiLDDp_Dwo

To claim this, I am signing this object:

@timcole
timcole / alerts.ts
Last active October 5, 2021 04:08
Twitch Activity Alerts Example
class PubSub {
private url: string = "wss://pubsub-edge.twitch.tv";
protected connection: WebSocket;
private heartbeat: number;
private topic: string;
constructor(channel: number) {
this.topic = `dashboard-activity-feed.${channel}`;
this.connection = new WebSocket(this.url);
@timcole
timcole / log.js
Last active February 16, 2020 00:22
Custom Log Example
export function Log(caller = "Router", ...logs) {
console.log(
`%c Notify.me %c ${caller} `,
"background: #a36ad8; color: #e8e8e8; border-radius: 3px 0 0 3px;",
"background: #6e4693; color: #e8e8e8; border-radius: 0 3px 3px 0;",
...logs
);
}
@timcole
timcole / deno-one-dark.css
Created May 20, 2020 12:42
One Dark Pro for deno.land
@-moz-document url-prefix("https://deno.land/") {
:root {
--border: #262831bd;
--background: #313440;
--text: #dee2f7;
--sidebar: #262831;
--sidebar_text: #9ea1b3;
--magenta: #bb7ed7;
--red: #d27277;
@timcole
timcole / octotree-theme.css
Last active December 8, 2020 22:21
Makes octotree match githubs theme
@-moz-document url-prefix("https://github.com/") {
.octotree-sidebar.octotree-github-sidebar .octotree-view-header,
.octotree-sidebar.octotree-github-sidebar .octotree-footer,
.octotree-sidebar.octotree-github-sidebar .octotree-views .octotree-tree-view .jstree-default .jstree-wholerow-clicked,
.octotree-sidebar.octotree-github-sidebar .octotree-views .octotree-tree-view .jstree-default .jstree-wholerow-hovered,
.octotree-sidebar.octotree-github-sidebar .octotree-bookmark__item:hover,
.octotree-sidebar.octotree-github-sidebar .octotree-bookmark__search,
.octotree-tabs-nav__bar::before,
.octotree-tabs-nav__bar .octotree-tabs-nav__item.active,
.octotree-tabs-nav__bar .octotree-tabs-nav__item::after,
@timcole
timcole / eventsub-clear.ts
Created December 15, 2020 12:34
Clear all events in Twitch's Eventsub API
import fetch from 'node-fetch';
async function main(): Promise<void> {
let cursor: string | undefined;
do {
const { pagination, total, data } = await getEvents(cursor);
cursor = pagination?.cursor;
console.log(cursor, total, data.length);