Skip to content

Instantly share code, notes, and snippets.

@maxrabin
maxrabin / CountLinesAndLetters.js
Created March 13, 2016 12:09
Example Lambda Function to process lines of text files when uploaded to S3
'use strict';
var AWS = require('aws-sdk');
var S3 = new AWS.S3();
var readline = require('readline');
exports.handler = function (event, context) {
//Get S3 file bucket and name
//Make sure to loop through event.Records, don't assume there is only 1 in production!!!
var bucket = event.Records[0].s3.bucket.name;
var key = event.Records[0].s3.object.key;
@joernchen
joernchen / bounty.txt
Created February 22, 2014 16:17
Bounty writeup
GitHub RCE by Environment variable injection Bug Bounty writeup
Disclaimer: I'll keep this really short but I hope you'll get the key points.
GitHub blogged a while ago about some internal tool called gerve:
https://github.com/blog/530-how-we-made-github-fast
Upon git+sshing to github.com gerve basically looks up your permission
on the repo you want to interact with. Then it bounces you further in
another forced SSH session to the back end where the repo actually is.
@miguelbermudez
miguelbermudez / Vagrantfile
Created October 29, 2013 13:51
Python Vagrant Box
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "puppetlabs-precise64"
name := "tsn-api-live"
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
"net.debasishg" % "redisclient_2.10" % "2.11"
)
@mguillermin
mguillermin / ImplicitSenderTest.scala
Last active February 5, 2021 07:47
Sample showing basic usage of Akka TestKit and TestActorRef
package sample.akka.testkit
import akka.actor.ActorSystem
import akka.actor.Actor
import akka.testkit.{TestKit, TestActorRef}
import org.scalatest.matchers.MustMatchers
import org.scalatest.WordSpec
class ImplicitSenderTest extends TestKit(ActorSystem("testSystem"))
// Using the ImplicitSender trait will automatically set `testActor` as the sender
@edofic
edofic / MongoDb.scala
Created June 10, 2013 21:28
reactive mongo without play
package models
import com.typesafe.config.ConfigFactory
import reactivemongo.api.{DefaultDB, DB, MongoDriver}
import akka.event.slf4j.Logger
import reactivemongo.api.collections.default.BSONCollection
import scala.util.Try
object MongoDb {
private val logger = Logger("MongoDB")
@malarkey
malarkey / Contract Killer 3.md
Last active May 24, 2024 23:38
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………