Skip to content

Instantly share code, notes, and snippets.

View svperfecta's full-sized avatar
👾

Brian Corrigan svperfecta

👾
View GitHub Profile
@svperfecta
svperfecta / sample.js
Last active February 3, 2017 22:21
Sample
{
"data": {
"type": "sample",
"id": "1",
"attributes": {
"createdAt": "2017-01-11T03:00:00Z",
"shardId": "na",
"t0": "2017-01-11T03:00:00Z",
"t1": "2017-01-11T04:00:00Z",
"titleId": "test"
@svperfecta
svperfecta / artifact.js
Last active February 3, 2017 21:31
Artifactory Format
{
"data": {
"type": "artifact",
"id": "", // Optional - Can be provided or will be automatically created. If provided *must* be unique for each new version of the champ (or new versions will overwrite old ones)
"attributes": {
slug: "taka", // Required, no spaces, used for urls - We will calculate this.
name: "Taka", // Required
class: "hero", // Abitrary, intended to be word no spaces like hero, ability, faction, item
title: "Blade in Shadow", // Optional
description: "You are Taka of House Kamuha. I have unburdened your mind of memory and remorse. This is my gift to you. It is a great honor to be of House Kamuha. You are of House Kamuha... SAY IT!", // Optional, can support html for markup
@svperfecta
svperfecta / gist:c11f204e4d3f95870ff55c06517b5360
Last active October 7, 2016 14:18
erlang:process_info(Pid).
(ejabberd@host1)8> erlang:process_info(Pid).
[{current_function,{gen,do_call,4}},
{initial_call,{proc_lib,init_p,5}},
{status,waiting},
{message_queue_len,877855},
{messages,[{process_iq,{jid,<<"887eca26-e6ad-11e5-8b18-062cb73cdbb1">>,
<<"mycorp.net">>,<<"2592797013071216009701042">>,
<<"887eca26-e6ad-11e5-8b18-062cb73cdbb1">>,
<<"mycorp.net">>,<<"2592797013071216009701042">>},
{jid,<<"887eca26-e6ad-11e5-8b18-062cb73cdbb1">>,
#
# In this file you can configure options that are passed by ejabberdctl
# to the erlang runtime system when starting ejabberd
#
#' POLL: Kernel polling ([true|false])
#
# The kernel polling option requires support in the kernel.
# Additionally, you need to enable this feature while compiling Erlang.
#
###
###' ejabberd configuration file
###
###
### The parameters used in this configuration file are explained in more detail
### in the ejabberd Installation and Operation Guide.
### Please consult the Guide in case of doubts, it is included with
### your copy of ejabberd, and is also available online at
### http://www.process-one.net/en/ejabberd/docs/
+---------------------+------------------------------------------------------------------------+-----------+----------------------------------------+
| created_at | username | kind | txt |
+---------------------+------------------------------------------------------------------------+-----------+----------------------------------------+
| 2016-08-31 04:02:04 | #d26b9e78-6b20-11e6-9b5b-06567476c2f5@conference.superevilmegacorp.net | groupchat | Chatter! |
| 2016-08-31 03:43:24 | #d26b9e78-6b20-11e6-9b5b-06567476c2f5@conference.superevilmegacorp.net | groupchat | ZZZZZZZZZZZZ |
| 2016-08-31 03:43:17 | #d26b9e78-6b20-11e6-9b5b-06567476c2f5@conference.superevilmegacorp.net | groupchat | Another message |
| 2016-08-31 03:42:50 | #d26b9e78-6b20-11e6-9b5b-06567476c2f5@conference.superevilmegacorp.net | groupchat | AAAAAAAAAAA
@svperfecta
svperfecta / s3iampermissions.json
Last active February 24, 2020 04:04
S3 Bucket Upload Permissions
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets"
],
"Resource": [
"arn:aws:s3:::*"
'use strict'
var Assert = require('assert')
var _ = require('lodash')
var Redis = require('redis')
var Uuid = require('node-uuid')
var Cryo = require('cryo')
var NAME = 'redis-store'
var MIN_WAIT = 16
sub vcl_recv {
if (req.http.X-OperaMini-Features || req.http.User-Agent ~ " Silk-Accelerated=true$") {
set geoip.use_x_forwarded_for = true;
}
set req.http.X-Geo-Country-Code = geoip.country_code;
set req.http.X-Real-IP = req.http.Fastly-Client-IP;
#FASTLY recv
@svperfecta
svperfecta / gist:bd7535b42e3658c63df0
Last active November 23, 2015 21:17
Example News RSS Feed

Feed will also support the media rss spec as part of our RSS parsing. This allows a nice way to provide links to assets (images, video, etc) within the rss feed in a standardized way.

This requires the tag to add additional XML namespaces (xmlns:media).

These are used within an RSS feed like so:

<?xml version="1.0"?>
<rss version="2.0"
    xmlns:xcal="urn:ietf:params:xml:ns:xcal"
>