Skip to content

Instantly share code, notes, and snippets.

View zeevro's full-sized avatar

Zeev Rotshtein zeevro

View GitHub Profile
@avestura
avestura / delete-from-users-where-location-iran.md
Last active October 19, 2025 09:21
DELETE FROM users WHERE location = 'IRAN';

DELETE FROM users WHERE location = 'IRAN';

Hi! I am an Iranian Software Engineer, and in this torn paper note, I want to talk about some funny moments I had online related to the fact that I was spawned in this specific region of the world: Iran.

Microsoft deleted my app, ignored my mails

Back when I was a student, I got access to the Microsoft Imagine, and as a result, I got access to the Microsoft Store as a developer. This inspired me write one of my open-source projects called EyesGuard and publish it on Microsoft Store. However, one day, somebody told me that they can no longer find EyesGuard on the store.

@outofmbufs
outofmbufs / keyed_lru_cache.py
Created February 16, 2023 21:51
enhance python lru_cache with key capability so it will only use a subset of the arguments for cache lookup
# MIT License
#
# Copyright (c) 2023 Neil Webber
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@willwm
willwm / campbell.json
Last active September 2, 2025 06:03
Campbell Color Scheme
{
"name" : "Campbell",
"cursorColor": "#FFFFFF",
"selectionBackground": "#FFFFFF",
"background" : "#0C0C0C",
"foreground" : "#CCCCCC",
"black" : "#0C0C0C",
@roalcantara
roalcantara / XDG.cheat-sheet.md
Last active October 18, 2025 17:36
XDG cheat sheet

XDG - Base Directory Specification

Directories

Base

The intended use-case for BaseDirectories is to query the paths of user-invisible standard directories that have been defined according to the conventions of the operating system the library is running on.

@UserExistsError
UserExistsError / winpty.go
Created September 5, 2020 18:14
Windows Pseudo Console (ConPTY) in Golang
package main
// Windows pty example
// https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/
import (
"io"
"os"
"fmt"
"log"
@mmmunk
mmmunk / TempLoggerService.c
Created June 18, 2020 11:14
Very basic Windows Service template in C
// Very basic Windows Service template - maybe not fully correct/complete but it works.
// x86_64-w64-mingw32-gcc -mwindows -municode -O2 -s -o TempLoggerService.exe TempLoggerService.c
// SC create TempLoggerService binpath="C:\Temp\TempLoggerService.exe"
// SC delete TempLoggerService
#include <windows.h>
#include <stdio.h>
#define SERVICE_NAME L"TempLoggerService"
@mjkillough
mjkillough / esp8266-sender.py
Created September 27, 2016 23:15
Scripts for testing UDP multicast on ESP8266
#!/usr/bin/env python
# encoding: utf-8
import network
import socket
sta = network.WLAN(network.STA_IF)
sta.active(True)
sta.connect('ESSID', 'key')
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@matforest
matforest / simple-https-server.py
Last active July 31, 2021 18:02 — forked from dergachev/simple-https-server.py
Simple SSL Web Server using python's SimpleHTTPServer
# adapated from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate seperate key+crt files, make sure common name (CN) == ip or hostname
# openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout newkey.key -out newkey.crt
# run as follows:
# python simple-https-server.py
import BaseHTTPServer, SimpleHTTPServer
import ssl
# 0.0.0.0 allows connections from anywhere
@DraTeots
DraTeots / ComPort over Network.md
Last active October 16, 2025 23:56
ComPort over Network