Skip to content

Instantly share code, notes, and snippets.

@spreadred
spreadred / irc.d.ts
Created December 26, 2019 23:25 — forked from zipcode/irc.d.ts
node-irc typescript definition
declare module "irc" {
import events = require('events');
export interface Client extends events.EventEmitter {
send(command: string, ...args: string[]): void;
join(channel: string, callback: (arg: any)=>void): void;
part(channel: string, message: string): void;
part(channel: string, callback: (arg: any)=>void, message: string): void;
say(target: string, message: string): void;
ctcp(target: string, type: string, text: string): void;
@spreadred
spreadred / irc.d.ts
Created December 26, 2019 23:25 — forked from zipcode/irc.d.ts
node-irc typescript definition
declare module "irc" {
import events = require('events');
export interface Client extends events.EventEmitter {
send(command: string, ...args: string[]): void;
join(channel: string, callback: (arg: any)=>void): void;
part(channel: string, message: string): void;
part(channel: string, callback: (arg: any)=>void, message: string): void;
say(target: string, message: string): void;
ctcp(target: string, type: string, text: string): void;
@spreadred
spreadred / electron-jquery-fix.html
Created August 15, 2017 19:17
Fix for jquery plugins complaining about Uncaught ReferenceError: jQuery is not defined for Electron apps
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<!-- normal script imports etc -->
<script src="scripts/jquery.min.js"></script>
<script src="scripts/vendor.js"></script>
<!-- Insert this line after script imports -->
<script>if (window.module) module = window.module;</script>
@spreadred
spreadred / launch.json
Created August 15, 2017 15:50
launch.json to enable integrated debugging of an Electron app in VSCode on Windows
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main Process",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
"protocol": "legacy",
@spreadred
spreadred / gist:587742c60f680f3f54de725817b7294c
Created May 30, 2016 19:51 — forked from thinkphp/gist:1448754
Binary Search Tree Implementation in PHP
<?php
/**
* by Adrian Statescu <adrian@thinkphp.ro>
* Twitter: @thinkphp
* G+ : http://gplus.to/thinkphp
* MIT Style License
*/