This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule AcmeUdpLoggerTest.MessageReceiver do | |
| use ExUnit.Case | |
| @header <<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2>> | |
| @priority_code <<81>> | |
| @agent_number <<7, 0, 0, 0>> | |
| @message <<116, 104, 101, 32, 104, 101, 110, 32, 104, 97, 115, 32, 102, 108, 111, 119, 110, 32, 116, 104, 101, 32, 99, 111, 111, 112, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32>> | |
| test "it should extract relevant data from UDP packet" do | |
| packet = @header <> @priority_code <> @agent_number <> @message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is to enable WS support. Credits: # https://gist.github.com/Bubelbub/0a942a0d51a3d329897d | |
| # THIS WORKS! for running the example 5.0.0.beta1 chat app on a single instance Elastic beanstalk AWS instance | |
| files: | |
| "/etc/nginx/conf.d/websockets.conf" : | |
| content: | | |
| upstream backend { | |
| server unix:///var/run/puma/my_app.sock; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Hack | |
| def initialize words | |
| @words = words.downcase.split(/\/|\s|,\s|\,/) | |
| @splitwords = [] | |
| @words.each { |w| @splitwords << w.split('') } | |
| show_likely | |
| end | |
| def deduct |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| packages: | |
| yum: | |
| git: [] | |
| htop: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var https = require('https'); | |
| var util = require('util'); | |
| exports.handler = function(event, context) { | |
| console.log(JSON.stringify(event, null, 2)); | |
| console.log('From SNS:', event.Records[0].Sns.Message); | |
| var postData = { | |
| "channel": "#aws-sns", | |
| "username": "AWS SNS via Lamda :: DevQa Cloud", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var async = require("async"); | |
| var AWS = require("aws-sdk"); | |
| var gm = require("gm").subClass({imageMagick: true}); | |
| var fs = require("fs"); | |
| var mktemp = require("mktemp"); | |
| var THUMB_KEY_PREFIX = "thumbnails/", | |
| THUMB_WIDTH = 150, | |
| THUMB_HEIGHT = 150, | |
| ALLOWED_FILETYPES = ['png', 'jpg', 'jpeg', 'bmp', 'tiff', 'pdf', 'gif']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- General Settings --> | |
| <advancedsettings> | |
| <loglevel hide="true">-1</loglevel> <!-- Comment: Disables logging --> | |
| <playcountminimumpercent>95</playcountminimumpercent> | |
| <skiploopfilter>0</skiploopfilter> <!-- Comment: For RPi or similar use 16 or higher (low CPU usage) --> | |
| <nodvdrom>true</nodvdrom> | |
| <!-- MySQL Library --> | |
| <videodatabase> | |
| <type>mysql</type> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- phpMyAdmin SQL Dump | |
| -- version 4.2.7.1 | |
| -- http://www.phpmyadmin.net | |
| -- | |
| -- Host: localhost | |
| -- Generation Time: Dec 12, 2014 at 07:20 PM | |
| -- Server version: 5.6.20 | |
| -- PHP Version: 5.5.15 | |
| SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # OSX for Hackers (Mavericks/Yosemite) | |
| # | |
| # Source: https://gist.github.com/brandonb927/3195465 | |
| #!/bin/sh | |
| # Some things taken from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Ask for the administrator password upfront |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install Git needed for Git based gems | |
| packages: | |
| yum: | |
| git: [] | |