Skip to content

Instantly share code, notes, and snippets.

View maxmumford's full-sized avatar

Max Mumford maxmumford

  • Cocept
  • Brighton
View GitHub Profile
@maxmumford
maxmumford / document-offset.d.ts
Created November 28, 2018 13:14
TypeScript type definition for document-offset npm package
declare module 'document-offset' {
export default function offset(ele: HTMLElement): {top: number, left: number};
}
@maxmumford
maxmumford / css-vars-ponyfill.d.ts
Created March 26, 2018 14:10
css-vars-ponyfill typescript
declare module 'css-vars-ponyfill' {
export default function cssVars(css: {
variables: any,
onSuccess?(cssText: string): void,
onError?(message: string, node: any): void,
onWarning?(message: string): void,
onComplete?(cssText: string, styleNode: any): void,
}): void;
}
@maxmumford
maxmumford / webcamjs-typescript.ts
Last active February 23, 2018 17:34
Basic TypeScript module definition for webcamjs
declare module 'webcamjs' {
export function attach(selector: string): any;
export function snap(callback: (dataUri: string) => void): void;
export function reset(): void;
export function on(event: 'live', callback: () => void): void
export function on(event: 'error', callback: (error: Error) => void): void
export function off(event: string, callback?: () => void): void;
}
[
/* left wrist top */
/* left thumb */
[
{"x": 86, "y": 1},
{"x": 128, "y": 27},
{"x": 166, "y": 44},
{"x": 193, "y": 30},
{"x": 227, "y": 12},
{"x": 243, "y": 7},
// builds an rgba string to use for canvas fill style
window.cocept.build_rgba = function(red, green, blue, alpha) {
var rgba = 'rgba('
+ red
+ ', '
+ green
+ ', '
+ blue
+ ', '
+ alpha
permalink: /:categories/:title/
permalink: /:categories/:title
server {
listen 80;
# ... rest of my configuration settings ... #
client_max_body_size 20M;
}
python wordpress_seo_spam_remover.py -d mysql_database_name -u mysql_username -p mysql_password -o mysql_hostname