I hereby claim:
- I am sudosoul on github.
- I am sudosoul (https://keybase.io/sudosoul) on keybase.
- I have a public key ASCOPcy1Ua_ZHRfCuBuurqDOQ0C01F_cgHjOXWJ94XIzcwo
To claim this, I am signing this object:
worker_processes auto; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
worker_processes auto; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
#!/bin/bash | |
while [ true ]; do | |
open \ | |
-na 'Google Chrome' \ | |
--args \ | |
--new-window 'https://i.imgur.com/RIN87.jpg' \ | |
&& sleep 5; | |
done |
--- | |
########################################################################################## | |
# HTTP Digest Auth with URI Module POC | |
# | |
# Usage: | |
# 1. Create a new playbook called `test.yml` | |
# | |
# 2. Run it via: | |
# ``` | |
# ansible-playbook test.yml \ |
{ | |
"encodedImages": [ | |
{ | |
"type": "high_pass", | |
"encodedImage": "a very long base64 encoded image string" | |
}, | |
{ | |
"type": "red_channel", | |
"encodedImage": "a very long base64 encoded image string" | |
}, |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>MY APP</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> | |
</head> | |
<body> | |
I hereby claim:
To claim this, I am signing this object:
// Using location.search (gets querystring from current URL) | |
let urlParams = getUrlParams(location.search); // Assume location.search = "?a=1&b=2b%202" | |
console.log(urlParams); // Prints { "a": 1, "b": "2b 2" } | |
// Using a URL string | |
const url = 'https://example.com?a=A%20A&b=1'; | |
urlParams = getUrlParams(url); | |
console.log(urlParams); // Prints { "a": "A A", "b": 1 } | |
// To check if a parameter exists, simply do: |
/** | |
* Accepts either a URL or querystring and returns an object associating | |
* each querystring parameter to its value. | |
* | |
* Returns an empty object if no querystring parameters found. | |
*/ | |
function getUrlParams(urlOrQueryString) { | |
if ((i = urlOrQueryString.indexOf('?')) >= 0) { | |
const queryString = urlOrQueryString.substring(i+1); | |
if (queryString) { |
/** | |
* Accepts either a URL or querystring and returns an object associating | |
* each querystring parameter to its value. | |
* | |
* Returns an empty object if no querystring parameters found. | |
*/ | |
function getUrlParams(urlOrQueryString) { | |
if ((i = urlOrQueryString.indexOf('?')) >= 0) { | |
const queryString = urlOrQueryString.substring(i+1); | |
if (queryString) { |