Skip to content

Instantly share code, notes, and snippets.

@lapnd
lapnd / gist:7f807e4c0856779cf7883a25c53aa094
Created January 6, 2018 16:04 — forked from atcuno/gist:3425484ac5cce5298932
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

@lapnd
lapnd / spectre.c
Created January 6, 2018 15:36 — forked from ErikAugust/spectre.c
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@lapnd
lapnd / spectre.c
Created January 4, 2018 16:38 — forked from Badel2/spectre.c
Spectre attack example implementation
/* https://spectreattack.com/spectre.pdf */
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@lapnd
lapnd / bash-colors.md
Created December 13, 2017 07:48 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@lapnd
lapnd / GoogleAuthenticationCurl.sh
Created December 3, 2017 15:24 — forked from LindaLawton/GoogleAuthenticationCurl.sh
Curl bash script for getting a Google Oauth2 Access token
# Client id from Google Developer console
# Client Secret from Google Developer console
# Scope this is a space seprated list of the scopes of access you are requesting.
# Authorization link. Place this in a browser and copy the code that is returned after you accept the scopes.
https://accounts.google.com/o/oauth2/auth?client_id=[Application Client Id]&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=[Scopes]&response_type=code
# Exchange Authorization code for an access token and a refresh token.
curl \
digraph architecture {
rankdir=LR;
// Storage - #303F9F (dark blue)
node[fillcolor="#303F9F" style="filled" fontcolor="white"];
database[label="DB"]; cache[label="Redis"];
// Client-side Apps - #FFEB3B (yellow)
node[fillcolor="#FFEB3B" style="filled" fontcolor="black"];
front_end[label="Front-end App"]; extension[label="Browser Extension"];
digraph architecture {
rankdir=LR;
// Storage - #303F9F (dark blue)
node[fillcolor="#303F9F" style="filled" fontcolor="white"];
database[label="DB"]; cache[label="Redis"];
// Client-side Apps - #FFEB3B (yellow)
node[fillcolor="#FFEB3B" style="filled" fontcolor="black"];
front_end[label="Front-end App"]; extension[label="Browser Extension"];
@lapnd
lapnd / Netfilter-IPTables-Diagrams.md
Created October 13, 2017 06:07 — forked from nerdalert/Netfilter-IPTables-Diagrams.md
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

@lapnd
lapnd / GCLB1000000
Created September 15, 2017 03:54 — forked from voellm/GCLB1000000
The following instructions walk you step-by-step in setting up a Google Compute Load Balancer benchmark that achieves 1,000,000 Requests Per Second. It is the code and step were used when writing a blog post for the Google Cloud Platform blog. You can find the Google Cloud Platform blog @ http://googlecloudplatform.blogspot.com/ This GIST is a c…
***NOTE --- This has been updated since the 1M RPS blog post to run on V1 of the GCE API
The scripts below are are broken up into:
1. Web Server In-Guest Startup Script used to create the Web Server Image.
Called webgueststartup.sh
2. Launch the Web Server machines using the previously created image.
Called webprovision.bash
3. Load Generator In-Guest Startup Script.
Called loadgengueststartup.sh
4. Launch the Load Generator machines using the Load Generator In-Guest Startup Script.
@lapnd
lapnd / Machine Learning Curriculum.md
Created April 27, 2017 05:42 — forked from offchan42/Machine Learning Curriculum.md
Machine learning resources and related artificial intelligence concepts.

ATTENTION PLEASE

Please see that repository instead because you can make pull requests there and later updates will be pushed there too.

===

# Machine Learning Curriculum Machine Learning is a branch of Artificial Intelligence dedicated at making machines learn from observational data without being explicitly programmed.