Skip to content

Instantly share code, notes, and snippets.

@DJDANNY123
DJDANNY123 / signing-utils.test.ts
Last active March 27, 2025 17:09
K6 Subtle Webcrypto Jwt Signing, this simple example is for ES256 (ECDSA with the P-256 Elliptic Curve), but the same technique should be applicable with different keys
import {
describe,
expect,
// @ts-expect-error importing from url
} from 'https://jslib.k6.io/k6chaijs/4.3.4.3/index.js';
import { crypto } from 'k6/experimental/webcrypto';
import {
encodeJwt,
printArrayBuffer,
string2ArrayBuffer,
@troopa81
troopa81 / HowtoBuildQGISonWindows.md
Last active December 7, 2024 09:26
My notes on how build QGIS on Windows with OSGEO4W v2

To build with Ninja

Download and install Cygwin : https://www.cygwin.com/setup-x86_64.exe Install it and and install the following packages : flex bison curl git unzip

Download and install last stable release of CMake : https://cmake.org/download/

I think we don't need to install git with Windows installer because we already have it with cygwin but I failed to clone https repo and I don't know which cygwin package a need to install.

@pedrouid
pedrouid / webcrypto-examples.md
Created December 15, 2018 01:07
Web Cryptography API Examples
@brad-anton
brad-anton / requests_connect_over_https.py
Last active June 3, 2024 16:16
This is a creative way to force python requests' module to issue a Proxy CONNECT over HTTPS. Also allows you to define proxy headers and other goodies
"""
requests_connect_over_https.py
@brad_anton
This is a creative way to force python requests' module to issue a Proxy
CONNECT over HTTPS. Also allows you to define proxy headers and other goodies
Warning: This was only tested partially
"""
@vcavallo
vcavallo / notes.md
Last active August 25, 2020 09:01
rails + webpacker + webpack-dev-server + vue + remote dev vps and nginx

Process goes something like this:

bundle update webpacker
rails webpacker:binstubs
yarn upgrade @rails/[email protected] # or 'add' instead of upgrade
yarn upgrade webpack-dev-server@"'3.1.4'  # or 'add' instead of upgrade
yarn add webpack-cli

bundle exec rails webpacker:install # don't do this! the scrpit seems to overwrite the @rails/webpacker version to 3.5.3
@kgjenkins
kgjenkins / readme.md
Last active January 14, 2025 20:26
Labels with callout lines in QGIS

Labels with callout lines in QGIS


UPDATE: As of October 2019, QGIS 3.10 has built-in support for label callout lines!


Callouts, sometimes called leader lines, are lines between labels and features on a map. They are useful when constraints of space force a label to be moved away from the

@bbonamin
bbonamin / Brewfile
Last active November 25, 2024 15:47
Capybara Selenium Webdriver: Headless Chrome (with file downloads!) & Headless Firefox
tap "caskroom/cask"
cask "google-chrome"
cask "firefox"
brew "chromedriver"
brew "geckodriver"
@robingustafsson
robingustafsson / jwt.js
Created October 14, 2017 20:16
Simple JWT example for k6 load testing tool
import crypto from "k6/crypto";
import encoding from "k6/encoding";
const algToHash = {
HS256: "sha256",
HS384: "sha384",
HS512: "sha512"
};
function sign(data, hashAlg, secret) {
@chunter
chunter / pageant-autoload-keys-at-startup.txt
Created June 20, 2017 10:51
Make Pageant autoload keys at startup
To make Pageant automatically run and load keys at startup:
- Find the location of pageant.exe
- Windows key + R to open the 'run' dialog box
- Type: 'shell:startup' in the dialog box
- Create a shortcut to the pageant.exe and put into this startup folder.
@luckydev
luckydev / gist:b2a6ebe793aeacf50ff15331fb3b519d
Last active April 3, 2025 18:13
Increate max no of open files limit in Ubuntu 16.04/18.04 for Nginx
# maximum capability of system
user@ubuntu:~$ cat /proc/sys/fs/file-max
708444
# available limit
user@ubuntu:~$ ulimit -n
1024
# To increase the available limit to say 200000
user@ubuntu:~$ sudo vim /etc/sysctl.conf