Skip to content

Instantly share code, notes, and snippets.

View Askill's full-sized avatar
🏠
Working from home

Patrice Matz Askill

🏠
Working from home
View GitHub Profile
@gkbrk
gkbrk / slowloris.py
Last active January 13, 2022 09:28
Slowloris implementation in Python. https://github.com/gkbrk/slowloris
import socket
import random
import time
import sys
log_level = 2
def log(text, level=1):
if log_level >= level:
print(text)
@komuw
komuw / gist:076231fd9b10bb73e40f
Created May 20, 2015 15:59
Shell script to generate server cert, key and client certs (all self-signed)
#! /usr/bin/env bash
# Create the CA Key and Certificate for signing Client Certs
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
# Create the Server Key, CSR, and Certificate
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
@nbremer
nbremer / README.md
Last active November 30, 2022 15:24
Zoomable Circle Packing with Canvas & D3.js - I

This is the third step of my first attempt to learn canvas. I want to improve a piece a made a few weeks ago about the division of occupations. The D3.js version has so many DOM elements due to all the small bar charts that it is very slow. Therefore, I hope that a canvas version might improve things

To not stray too far from D3.js I used the excellent tutorials on canvas and d3 from Irene Ros & Yannick Assogba which you can find here and here. I managed to get the circle packing working. However, when you zoom it is very jittery.

I wrote a more extensive tutorial around what I learned while doing this project in my blog Learnings from a D3.js addict on starting with Canvas in which this can be seen as step 3. See the previous, [non-zoomable version here](http://bl.ocks.org/

@DianaEromosele
DianaEromosele / Change "origin" of your GIT repository
Created August 7, 2016 00:31
Change "origin" of your GIT repository
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@mda590
mda590 / boto3_get-ssm-parameter.py
Last active July 7, 2022 12:23
Get a Secure String parameter stored in the EC2 Systems Manager
def getParameter(param_name):
"""
This function reads a secure parameter from AWS' SSM service.
The request must be passed a valid parameter name, as well as
temporary credentials which can be used to access the parameter.
The parameter's value is returned.
"""
# Create the SSM Client
@sanjay-btc
sanjay-btc / gist:c332d6f8a886853d5071f0a08051ff70
Created December 20, 2018 06:23
Install AWS Vault in Ubuntu
sudo curl -L -o /usr/local/bin/aws-vault https://github.com/99designs/aws-vault/releases/download/v4.2.0/aws-vault-linux-amd64
sudo chmod 755 /usr/local/bin/aws-vault
@vlcinsky
vlcinsky / test_s3_json_bucket.py
Created June 14, 2020 10:45
S3JsonBucket to dump/load data to S3 bucket. Comment to https://stackoverflow.com/a/50101751/346478
import json
import boto3
class S3JsonBucket:
def __init__(self, bucket_name):
self.bucket = boto3.resource("s3").Bucket(bucket_name)
def load(self, key):