Skip to content

Instantly share code, notes, and snippets.

View jgautheron's full-sized avatar
☁️
Learning

Jonathan Gautheron jgautheron

☁️
Learning
View GitHub Profile
@jgautheron
jgautheron / protoanomalies.rules
Created December 3, 2017 10:14 — forked from mpurzynski/protoanomalies.rules
Suricata rules for protocol anomalies
alert tcp any any -> any !80 (msg:"SURICATA HTTP on unusual port"; flow:to_server; app-layer-protocol:http; threshold: type limit, track by_src, seconds 60, count 1; sid:2271001; rev:1;)
alert tcp any any -> any 80 (msg:"SURICATA non-HTTP on TCP port 80"; flow:to_server; app-layer-protocol:!http; threshold: type limit, track by_src, seconds 60, count 1; sid:2271002; rev:1;)
alert tcp any any -> any ![443,465,587] (msg:"SURICATA TLS on unusual port"; flow:to_server; app-layer-protocol:tls; threshold: type limit, track by_src, seconds 60, count 1; sid:2271004; rev:1;)
alert tcp any any -> any [443,465] (msg:"SURICATA non-TLS on TLS port"; flow:to_server; app-layer-protocol:!tls; threshold: type limit, track by_src, seconds 60, count 1; sid:2271003; rev:1;)
alert tcp any any -> any ![20,21] (msg:"SURICATA FTP on unusual TCP port"; flow:to_server; app-layer-protocol:ftp; threshold: type limit, track by_src, seconds 60, count 1; sid:2271005; rev:1;)
alert tcp any any -> any [20,21] (msg:"SURICATA non-FTP on TCP
@jgautheron
jgautheron / build.sh
Created November 2, 2017 12:09 — forked from russelldavies/build.sh
AWS Lambda Weasyprint
#!/bin/sh
mkdir task
cp build_weasyprint.sh task
docker run --rm -it -v $PWD/task:/var/task \
-e LD_LIBRARY_PATH='/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib' \
lambdalinux/baseimage-amzn build_weasyprint.sh
@jgautheron
jgautheron / Fastfile
Created August 8, 2017 13:58 — forked from kennydee/Fastfile
Fastfile for staging environment with Appetize.io on React Native (iOs & Android), with statuses update on Github Enterprise
require 'httparty'
fastlane_version "1.95.0"
default_platform :ios
before_all do
# put here your token and iOs scheme app
ENV["GITHUB_TOKEN"] = "---"
ENV["APPETIZE_TOKEN"] = "---"
ENV["APP_IOS_SCHEME"] = "---"
@jgautheron
jgautheron / get_password.py
Created July 14, 2017 15:34 — forked from JohnPreston/get_password.py
Get password from DynamoDB and decrypt with KMS
import base64
import uuid
import httplib
import urlparse
import json
import boto3
import string
import random
@jgautheron
jgautheron / issuu_downloader.rb
Created June 27, 2017 18:26 — forked from pietrop/issuu_downloader.rb
To download magazine from issuu.com when the download option has been disabled. in practice the script doesn't actually download the pdf, but rather download the images of the pages of the flash object and then combines those into a pdf
require 'mechanize'
require 'prawn'
=begin
running from terminal to download any pdf from issuu.com, given
- magazine name
- page count
- document-id
=end
@jgautheron
jgautheron / overlay.sh
Last active May 31, 2017 12:13 — forked from cjbottaro/overlay.sh
Convert ECS Optimized AMI to use overlay/overlay2
set -e
# Stop the docker daemon
/etc/init.d/docker stop
# Configure ECS Agent
# http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html
# http://docs.aws.amazon.com/AmazonECS/latest/developerguide/automated_image_cleanup.html
cat > /etc/ecs/ecs.config << "EOF"
ECS_ENGINE_TASK_CLEANUP_WAIT_DURATION=1h
@jgautheron
jgautheron / One import via join.yaml
Created May 10, 2017 17:43 — forked from jespereneberg/One import via join.yaml
Fn::ImportValue from other stacks
Tags:
- Key: Name
Value:
!Join ['_', [ ec2, "Fn::ImportValue" : {"Fn::Sub":'${BaseStackName}-Environment'}, test2]]
#This will create a name tag with value: ec2_<yourValueFromOtherStack>_test2
@jgautheron
jgautheron / CategorySagas.js
Created March 22, 2017 19:07 — forked from pesakitan22/CategorySagas.js
Redux-Saga for next.js
import {call, put, take, fork} from 'redux-saga/effects'
import {END} from 'redux-saga'
import CategoryActions, {CategoryTypes} from '../Redux/CategoryRedux'
// attempts to fetch category
export function* fetchCategoryServer (api) {
let action = yield take(CategoryTypes.CATEGORY_SERVER)
// check when it stopped
while (action !== END) {
yield fork(fetchCategoryAPI, api)
@jgautheron
jgautheron / osx-for-hackers.sh
Created September 26, 2016 20:24 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@jgautheron
jgautheron / about.md
Last active May 4, 2016 12:37 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer