Skip to content

Instantly share code, notes, and snippets.

@The-Quill
The-Quill / tavern.js
Last active January 5, 2016 15:08
Monitor chat things
var socket, url;
connect();
var ROOMID = 89; //Tavern
ROOMID = 8595; //2nd Monitor
function connect() {
$.post('/ws-auth', fkey({
roomid: ROOMID
})).done(function (data) {
@The-Quill
The-Quill / handler.cs
Created January 6, 2016 01:07
Error handler
using System;
namespace Foo
{
public class Utils
{
public static object InvokeAndCatchError(Delegate del, object parameters, params object[] optionalParameters)
{
try
{
using System;
namespace Test1
{
public class Utils
{
public static object InvokeAndCatchError(Delegate del, object parameters, params object[] optionalParameters)
{
try
{
using System;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text.RegularExpressions;
using DatabaseGateway;
using HtmlAgilityPack;
using MEF.Contract;
using Scraper;
namespace Plugin1
@The-Quill
The-Quill / helpdesk2.md
Created January 8, 2016 23:15
CR Help Desk Comments 2

This question could be suitable for Code Review, as long as (a) your code works as intended, (b) your code is real code, rather than example code, and (c) your code is included in the body of the question. If you wish for a peer review to improve all aspects of your code, please post it on Code Review. If you have any questions or concerns, join us at our CR Help Desk.

@The-Quill
The-Quill / helpdesk1.md
Last active January 9, 2016 08:52
CR Help Desk Comments 1

This may be a good question for [codereview.se], so long as: (A) the code works, and (B) it's not hypothetical or incomplete in any way. Please read the on-topic guide before posting, if you choose to go to Code Review. If you have any questions or concerns, join us at our CR Help Desk.

// ==UserScript==
// @name Enable WinterBash 2015
// @namespace http://the-quill.github.io/me/
// @version 0.1
// @description Enable hats!
// @author Quill
// @match http://*.stackexchange.com/*
// @match http://meta.*.stackexchange.com/*
// @match http://*.stackexchange.com
// @match http://meta.*.stackexchange.com
@The-Quill
The-Quill / mutation_observers.js
Last active January 13, 2016 11:23
Mutation Observers
var messages = document.getElementsByClassName("messages");
var ChatObserver = new MutationObserver(function(data){
console.log(data);
ReplaceText(messages[messages.length]);
});
ChatObserver.observe(document.getElementById("chat"), {childList: true, attributes: true, characterData: true});
@The-Quill
The-Quill / disapprovalface.user.js
Last active February 5, 2016 01:20
Disapproval Face disapproves your content
// ==UserScript==
// @name ಠ_ಠ
// @namespace https://gist.github.com/The-Quill/4682157263765d71c7e3
// @updateURL https://gist.github.com/The-Quill/4682157263765d71c7e3/raw/4b972e34ef4fb3f000ac9dae3aa92068b123664e/disapprovalface.user.js
// @downloadURL https://gist.github.com/The-Quill/4682157263765d71c7e3/raw/4b972e34ef4fb3f000ac9dae3aa92068b123664e/disapprovalface.user.js
// @version 3.0
// @description ಠ_ಠ
// @author Quill
// @match *://*/*
// ==/UserScript==

#Whitespace

You should have whitespace around your operators:

xcoord=avenue;
for(int i=0;i<count;i++)