A collection of Splunk recipes for Heroku logs. Instructions for setting up Splunk Storm with Heroku can be found here. For the vast majority of these recipes you'll need to have enabled the Heroku labs feature, log-runtime-metrics, for your application.
This file contains 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 TCP = process.binding('tcp_wrap').TCP; | |
var SlowBuffer = require('buffer').SlowBuffer; | |
var util = require('util'); | |
var err; | |
var headers = 'HTTP/1.1 200 OK\r\n' + | |
'Connection: Keep-Alive\r\n' + | |
'Content-Type: text/plain; charset=latin-1\r\n' + | |
'Content-Length: 12\r\n\r\n' + | |
'hello world\n'; |
This file contains 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 esseintal packages for opencv | |
apt-get -y install build-essential | |
apt-get -y install cmake | |
apt-get -y install pkg-config | |
apt-get -y install libgtk2.0-dev libgtk2.0 | |
apt-get -y install zlib1g-dev | |
apt-get -y install libpng-dev | |
apt-get -y install libjpeg-dev | |
apt-get -y install libtiff-dev | |
apt-get -y install libjasper-dev |
This file contains 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
users = require './../data/users' | |
data = users: [] | |
data.users.anon = authenticated: false | |
data.users.admin = users[0] | |
data.users.jk = users[1] | |
data.users.artle = users[5] | |
data.users.beountain = users[4] | |
setSession = (userKey) -> |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Self-expanding textarea</title> | |
</head> | |
<body> | |
<textarea id="expand" rows="8" cols="40"></textarea> | |
<script type="text/javascript" charset="utf-8"> | |
var textarea = document.getElementById('expand') | |
var div = document.createElement('div') |
This file contains 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'), | |
fs = require('fs'), | |
utillib = require('util'); | |
var options = { | |
key: fs.readFileSync('private_key.pem'), | |
cert: fs.readFileSync('certificate.pem'), | |
ca: [ | |
fs.readFileSync('ESTEID-SK 2007.PEM.cer'), | |
fs.readFileSync('ESTEID-SK.PEM.cer'), |
This file contains 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
test: | |
override: | |
- bundle exec rspec spec | |
deployment: | |
acceptance: | |
branch: master | |
commands: | |
- ./script/heroku_deploy.sh <ACCEPTANCE_HEROKU_APP>: | |
timeout: 300 |
This file contains 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 MyApp.Scheduler do | |
@moduledoc """ | |
Schedules a Mix task to be run at a given interval in milliseconds. | |
## Options | |
- `:task`: The name of the Mix task to run. | |
- `:args`: A list of arguments to pass to the Mix task's `run/1` function. | |
- `:interval`: The time interval in millisconds to rerun the task. |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
pip install networkx distance pattern | |
In Flipboard's article[1], they kindly divulge their interpretation | |
of the summarization technique called LexRank[2]. |
[Google recently announced][poodle] that there is an exploit in SSLv3, this vulnerability is know as POODLE. There is no other option than to disable SSLv3 in order to combat this major flaw. There have already been [guides on how to disable this in different servers][guides]. But nothing excised for Node.js yet, until now. In order to resolve this for Node.js we need to use various of undocumented options and modules.
In the index.js
file below you can see an example of how you can protect your HTTPS server
against the POODLE attack. It uses the secureOptions
option to pass in constants in to the
SSL context which is created by node.
OlderNewer