Skip to content

Instantly share code, notes, and snippets.

View jreisinger's full-sized avatar
👋
hello friend

Jozef Reisinger jreisinger

👋
hello friend
View GitHub Profile
// Chat is a TCP server that connects couples so they can talk.
// Adapted from https://go.dev/talks/2012/chat.slide
package main
import (
"fmt"
"io"
"log"
"net"
)
@jreisinger
jreisinger / pyargs.py
Created November 21, 2017 07:57
Parse command line arguments in Python using sys.argv
#!/usr/bin/env python3
import sys
import re
script = sys.argv.pop(0)
while sys.argv:
arg = sys.argv.pop(0)
// Fibsrv is an HTTP server that calculate Fibonacci numbers.
package main
import (
"fmt"
"log"
"math/big"
"net/http"
"strconv"
)
@jreisinger
jreisinger / emojis.md
Last active May 30, 2023 16:38
emojis

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
'1' OR '1' = '1'
1'%20or%20'1'%20=%20'1
----
UserName='1'%20or%20'1'%20=%20'1'
Password=1%27+or+%271%27+%3D+%271
==> Incorrect syntax near '1'.
----
1%27+or+%271%27+%3D+%271
1%27+or+%271%27+%3D+%271
==> Chybné heslo!
// Fetch prints the download time and size for each URL. Usage:
//
// go build fetchz.go
// ./fetchz urls.txt
package main
import (
"bufio"
"fmt"
"io"
import argparse, hashlib, sys
from pathlib import Path
def store(path, data, key):
data_path = Path(path)
hash_path = data_path.with_suffix('.hash')
hash_value = hashlib.blake2b(data, key=key).hexdigest()
with data_path.open(mode='x'), hash_path.open(mode='x'):
data_path.write_bytes(data)
#!/usr/bin/env python3
import hashlib, sys
from hashlib import md5
def hash_with_all_guaranteed_algoritms(msg: bytes):
"""hash functions guaranteed to be available for all platforms"""
for algo in sorted(hashlib.algorithms_guaranteed):
try:
h = hashlib.new(algo)
#!/bin/bash
subnet=$1
[ -z $subnet ] && echo "Usage: $0 <subnet>" && exit 1
for host in $(seq 1 254); do
(ping -c1 -t1 $subnet.$host > /dev/null && arp $subnet.$host) &
done
sleep 5
package main
import (
"fmt"
"time"
)
func main() {
start := time.Now()
go func() {