Skip to content

Instantly share code, notes, and snippets.

@Olshansk
Olshansk / Slider.html
Last active July 26, 2025 12:24
Google Sheets Slider Add-on
<!DOCTYPE html>
<html>
<head>
<script>
function sliderValue(value){
console.log("sliderValue", value)
google.script.run.updateCellValue(value, 1, 1);
}
</script>
</head>
@up1
up1 / lifecycle.lua
Last active August 1, 2022 02:47
Wrk and Lua
Run ด้วยคำสั่ง
$wrk -c2 -t2 -d1s -s lifecycle.lua --latency https://www.google.com
--------------------------------
function setup(thread)
print("Called setup")
end
function init(args)
print("Called init")
@zawadz88
zawadz88 / CompletableOperatorsTest.kt
Last active July 9, 2024 22:35
Tests for disposing Disposables
package test
import io.reactivex.Completable
import io.reactivex.observers.TestObserver
import io.reactivex.schedulers.Schedulers
import org.junit.Assert.assertEquals
import org.junit.Rule
import org.junit.Test
import java.util.concurrent.Executors
@Julian-Nash
Julian-Nash / flask_sitemap_generator.py
Last active July 22, 2025 14:58
Flask dynamic sitemap generator
@app.route("/sitemap")
@app.route("/sitemap/")
@app.route("/sitemap.xml")
def sitemap():
"""
Route to dynamically generate a sitemap of your website/application.
lastmod and priority tags omitted on static pages.
lastmod included on dynamic content such as blog posts.
"""
from flask import make_response, request, render_template
@tayvano
tayvano / gist:6e2d456a9897f55025e25035478a3a50
Created February 19, 2017 05:29
complete list of ffmpeg flags / commands
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)
@v0lkan
v0lkan / nginx.conf
Last active May 1, 2026 02:49
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
@soarez
soarez / ca.md
Last active September 5, 2026 22:00
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@marcoslin
marcoslin / .gitignore
Last active May 8, 2025 15:11
Encryption: From PyCrypto to CryptoJS
source.sh
@jmyrland
jmyrland / test.js
Last active May 5, 2025 13:08
Socket-io load test?
/**
* Modify the parts you need to get it working.
*/
var should = require('should');
var request = require('../node_modules/request');
var io = require('socket.io-client');
var serverUrl = 'http://localhost';
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 25, 2026 07:50
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1