Skip to content

Instantly share code, notes, and snippets.

{
"Ansi 6 Color" : {
"Red Component" : 2.9028859671598184e-07,
"Color Space" : "sRGB",
"Blue Component" : 0.83137255907058716,
"Alpha Component" : 1,
"Green Component" : 0.73725491762161255
},
"Tags" : [
13.108.238.128/28,13.108.238.144/28,13.108.254.128/28,13.108.254.144/28,13.110.6.176/28,13.110.6.192/28,13.110.6.208/28,13.110.6.224/28,13.110.14.176/28,13.110.14.192/28,13.110.14.208/28,13.110.14.224/28,13.110.74.224/28,13.110.74.208/28,13.110.78.224/28,13.110.78.208/28,136.147.46.176/28,136.147.46.192/28,136.147.62.176/28,136.147.62.224/28,136.147.46.192/28,136.147.62.192/28,136.147.46.192/28,136.147.62.192/28,138.68.240.22/28
@connyay
connyay / Bookmarklet.js
Last active December 31, 2016 19:47
/u/ProudMod Bookmarklet
(function(messageNum) {
var messages = {
1: ["Warning Subject", "Yo! Knock it off.\n\nYou are not respecting the rules."],
2: ["Last Chance Subject", "This is your last chance!\n\nPlease review [the rules](https://www.reddit.com/r/ProudMod/wiki)"]
}
if (/reddit\.com\/user\/*/.test(location.href)) {
if (!messageNum) {
messageNum = prompt("Which message would you like to compose?");
}
var message = messages[messageNum];

Keybase proof

I hereby claim:

  • I am connyay on github.
  • I am connyay (https://keybase.io/connyay) on keybase.
  • I have a public key whose fingerprint is 18A9 F274 2D71 810E 50C5 9473 53CD 10ED B633 71AE

To claim this, I am signing this object:

@connyay
connyay / properties.json
Created March 10, 2015 12:01
sublime settings
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
@connyay
connyay / build
Last active August 29, 2015 14:10
PencilBlue config for OpenShift
#!/bin/bash
# .openshift/action_hooks/build
# Change home directory (npm puts a lot of cache and tmp directories here)
HOME=$OPENSHIFT_REPO_DIR
cd $OPENSHIFT_REPO_DIR
if [ "$OPENSHIFT_GEAR_UUID"=="$OPENSHIFT_APP_UUID" ]; then
# Main gear - cache node_modules for quicker pushes
mkdir -p "$OPENSHIFT_DATA_DIR"node_modules
Name: node-diy
Cartridge-Short-Name: NODEDIY
Display-Name: Node DIY
Description: "Node.js cartridge that lets you take the wheel"
Version: '0.10.32'
Source-Url: https://github.com/connyay/openshift-node-diy.git
License: "Apache v2"
License-Url: https://github.com/connyay/openshift-node-diy/blob/master/LICENSE
Cartridge-Version: 0.1
Compatible-Versions: ['0.1']
'use strict';
var tracer = require('tracer');
var daily = tracer.dailyfile({
format: '{{message}}',
root: './logs'
});
var color = tracer.colorConsole({
format: '{{message}}'
});
var levels = ['log', 'trace', 'debug', 'info', 'warn', 'error'];
@connyay
connyay / build
Created September 29, 2014 17:27
build example
#!/bin/bash
# Change home directory (bower puts a lot of cache and tmp directories here)
HOME=$OPENSHIFT_REPO_DIR
cd $OPENSHIFT_REPO_DIR
mkdir -p "$OPENSHIFT_DATA_DIR"node_modules
ln -s "$OPENSHIFT_DATA_DIR"node_modules node_modules
@connyay
connyay / index.js
Created September 19, 2014 21:48
zombie example
'use strict';
var Browser = require('zombie');
function logResult(num, period) {
console.log('There were ' + parseInt(num.replace(' ', ''), 10) + ' downloads in the last ' + period);
}
Browser.visit('https://www.npmjs.org/package/zombie', function(e, browser) {
var lastDay = browser.querySelector('.downloads tr:nth-of-type(1) td'),
lastWeek = browser.querySelector('.downloads tr:nth-of-type(2) td'),