Skip to content

Instantly share code, notes, and snippets.

View s3mme's full-sized avatar
:octocat:
tinkering around

s3mme s3mme

:octocat:
tinkering around
View GitHub Profile
@s3mme
s3mme / deduplicate_csv.sh
Created April 9, 2026 14:53
This snippet deduplicates a csv based on the 5th column (awk is 1-indexed).
awk -F';' -v OFS=';' '{
key = $5
if (!(key in seen)) {
print $0
seen[key]=1
}
}'
@s3mme
s3mme / URLClient.java
Last active April 25, 2025 13:00
Java class to send requests depending on the "urlString" (e.g., ftp://, http://, ...). This was created to test how Java connects to FTP servers via this method.
import java.io.*;
import java.net.URL;
import java.net.URLConnection;
public class URLClient {
public String sendGetRequest(String urlString) throws IOException {
// ambiguous if FTP or HTTP
URL url = new URL(urlString);
URLConnection urlConnection = url.openConnection();
@s3mme
s3mme / wicli.py
Created June 8, 2022 12:39
🔎 CLI tool for wikipedia searches
#!/usr/bin/env python3
import urllib.request as ur
import sys
import json
class color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'