Skip to content

Instantly share code, notes, and snippets.

View touatily's full-sized avatar
🏠
Working from home

Lyes Touati touatily

🏠
Working from home
View GitHub Profile
@michaelconnor00
michaelconnor00 / put_archive.py
Last active October 22, 2022 21:42 — forked from zbyte64/sample.py
Docker Python put_archive example
import tarfile
import time
import json
from io import BytesIO
import docker
src_code = """
if __name__ == "__main__":
print('Hello World, From Alpine!!!!!!!!!')
"""
@msoap
msoap / script.go
Last active October 8, 2022 17:23
Run Go program as script
//usr/bin/env go run $0 "$@"; exit
package main
import (
"fmt"
"os"
)
func main() {
fmt.Println("Hello world!")
@cdown
cdown / gist:1163649
Last active June 16, 2024 12:47
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in