Skip to content

Instantly share code, notes, and snippets.

View daluu's full-sized avatar

David Luu daluu

View GitHub Profile
@mortenege
mortenege / websockets_using_apache_reverse_proxy.md
Created March 4, 2018 07:10
WebSockets using Apache Reverse Proxy

WebSockets using Apache Reverse Proxy

This post will cover how to configure our already running server [1, 2] to proxy websocket connections to a backend of our choice. We will continue using Vagrant to provision the guest machine.

Step 1

Clone or download a simple websocket server into our vagrantfolder (and extract if an archive).

Step 2

Modify 001-mysite.conf to include our websocket redirect.

@timproDev
timproDev / index.html
Last active December 27, 2021 22:41
Pareto Chart
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Timmy's Pareto Chart!</title>
<!-- css dynamically injected -->
</head>
<body>
@tegansnyder
tegansnyder / Preventing-Puppeteer-Detection.md
Created February 23, 2018 02:41
Preventing Puppeteer Detection

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@aramalipoor
aramalipoor / README.md
Last active February 22, 2018 17:18
Custom WRK (https://github.com/wg/wrk) script to count a response header useful for A/B load testing

Example

wrk -t 5 -c 10 -d 10s -s wrk-hostname-counter.lua https://example.com/

 ------------------------------------------------
 server-b-pxchg: 50.3333% (151 total)
 server-a-n82cc: 3.33333% (10 total)
 server-a-lr665: 3.33333% (10 total)
 server-a-7cnws: 3.33333% (10 total)
// Gatling upload of file (blobFilename, blobPath, blobMimeType) into bucket with a PUT request (limited to 5g)
.exec(session => {
val script = "/path/to/awsS3Sign.sh " +
bucket + " " + session("blobFilename").as[String] + " " + session("blobMimeType").as[String]
val scriptOutput: String = script.!!
val dateHeader: String = scriptOutput.substring(0, scriptOutput.indexOf('|'))
val authorizationHeader: String = scriptOutput.substring(scriptOutput.indexOf('|') + 1).trim()
println("Upload " + session("blobFilename").as[String])
session.set("awsDate", dateHeader)
.set("awsAuth", authorizationHeader)
@xujiaao
xujiaao / android-set-ntp-server.md
Last active May 4, 2025 12:55
Set the NTP server of your android device
tags
Android
Android Things

Set the NTP server of your android device

@bsletten
bsletten / ml-recs.md
Last active December 4, 2024 15:32
Machine Learning Path Recommendations

This is an incomplete, ever-changing curated list of content to assist people into the worlds of Data Science and Machine Learning. If you have a recommendation for something to add, please let me know. If something isn't here, it doesn't mean I don't recommend it, I just may not have had a chance to review it yet or not.

I will generally list things in order of easier to more formal/challenging content.

It may feel like there is an overwhelming amount of stuff for you to learn (because there is). But, there is a guided path that will get you there in time. You need to focus on Linear Algebra, Calculus, Statistics and probably Python (or R). Your best bet is to get a Safari Books Online account (https://www.safaribooksonline.com) which you may already have access to through school or work. If not, it is a reasonable way to get access to a tremendous number of books and videos.

I'm not saying you will get what you need out of everything here, but I have read/watched at least some of all of the following an

@fawkesley
fawkesley / randomize-mac-addresses.sh
Last active July 25, 2022 06:24
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
#!/bin/sh
# /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# INSTALL
#
# > curl -L 'https://gist.github.com/paulfurley/46e0547ce5c5ea7eabeaef50dbacef3f/raw/56ee5dd5f40dec93b8f7438cbdeda5475ea3b5d2/randomize-mac-addresses.sh' |sudo tee /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# > sudo chmod +x /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC
@davewongillies
davewongillies / Terraform_functions.md
Last active October 11, 2024 16:44
Terraform Functions

Supported built-in functions

  • abs(float) - Returns the absolute value of a given float. Example: abs(1) returns 1, and abs(-1) would also return 1, whereas abs(-3.14) would return 3.14. See also the signum function.

  • basename(path) - Returns the last element of a path.

  • base64decode(string) - Given a base64-encoded string, decodes it and returns the original string.

@MelTheTester
MelTheTester / Charter Template
Created November 28, 2017 15:58
Charter template for exploratory and session testing
Charter Name:
Session Time Planned: (Small(10-15min), Medium(15-30), Large(30-60))
Persona Notes:
Areas of Focus:
Notes:
Setup: (Configurations of app/servers/API/integrations)