Skip to content

Instantly share code, notes, and snippets.

View hunterbridges's full-sized avatar

Hunter Bridges hunterbridges

View GitHub Profile
@hunterbridges
hunterbridges / README.md
Last active June 21, 2023 18:05
Readme for @ModeAttract
@hunterbridges
hunterbridges / twitch_irc.md
Last active March 31, 2024 08:28
How to connect to Twitch with an IRC client (As of Oct 2015)

HOWTO

Connect to Twitch.tv chat with an IRC client

  1. Visit this website and get an OAuth Token for your Twitch account.
  2. Add a server to your IRC client with this configuration, using your OAuth Token as the server password. Make sure it is not using SSL.
{
  address = "irc.twitch.tv";
chatnet = "Twitch";
@hunterbridges
hunterbridges / 0_reuse_code.js
Last active September 15, 2015 19:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#import "PFObject+SubclassInit.h"
@implementation PFObject (SubclassInit)
+ (instancetype)subclass
{
Class klass = self;
SEL selector = @selector(parseClassName);
if ([klass respondsToSelector:selector]) {
#pragma clang diagnostic push
static inline CGRect CGRectBoundingRect(CGRect a, CGRect b) {
CGRect ret = {
.origin = {
MIN(CGRectGetMinX(a), CGRectGetMinX(b)),
MIN(CGRectGetMinY(a), CGRectGetMinY(b))
},
.size = {
MAX(CGRectGetMaxX(a), CGRectGetMaxX(b)) -
MIN(CGRectGetMinX(a), CGRectGetMinX(b)),
MAX(CGRectGetMaxY(a), CGRectGetMaxY(b)) -
// ==UserScript==
// @name Hide FB Chat button
// @description Hides FB chat button and sidebar
// @include *.facebook.com/*
// @exclude *.facebook.com/ajax/*
// @grant GM_getValue
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// ==/UserScript==
//
document.addEventListener('DOMSubtreeModified', function() {
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
typedef struct Cell {
int by;
} Cell;
int main(int argc, char *argv[]) {
int row = 5;
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
typedef struct Cell {
int by;
} Cell;
int main(int argc, char *argv[]) {
int row = 5;
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
typedef struct Cell {
int by;
} Cell;
int main(int argc, char *argv[]) {
int row = 5;
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
struct Stack {
int length;
void *members[SHRT_MAX];
};
struct Stack *Stack_create()