Skip to content

Instantly share code, notes, and snippets.

@jezek
jezek / electricsheep-install.sh
Last active February 12, 2023 22:46
Build electricsheep screensaver on ubuntu 22.10
#!/bin/bash
# Builds and installs Electricsheep screensaver on Ubuntu 22.10.
# Needs sudo for "apt install" and "make install" commands.
# Operates in /tmp and downloads stuff from internet (~ 100MB).
# Tested on Ubuntu 22.10 minimal install with 3rd party packages enabled.
# Inspired by https://gist.github.com/adrianwebb/f6a1c3a0393e5482a0add00b63ac49cf gist.
# Any subsequent(*) commands which fail will cause the shell script to exit immediately.
set -e
@jezek
jezek / X11KeyPressReleaseBytes.c
Created April 25, 2022 15:51
C and go programs for x11 key press/release events bytes (discussed in https://github.com/jezek/xgb/issues/6).
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <xcb/xcb.h>
int main () {
/* Open the connection to the X server */
# Based on oh-my-zsh gnzh theme
setopt prompt_subst
() {
local PR_USER PR_USER_OP PR_PROMPT PR_HOST
# Check the UID
if [[ $UID -ne 0 ]]; then # normal user
@jezek
jezek / app_code_local_Aschroder_Email_lib_AmazonSES.php
Last active December 2, 2021 15:34
Update of Magento's Ashroder Email module's lib/AmazonSES.php file to work with Signature version 4.
<?php
/**
* Zend_Http_Client extended for a function to sign a request for AmazonSES with signature version 4.
*
* @author jEzEk - 20210222
*/
class Zend_Http_Client_AmazonSES_SV4 extends Zend_Http_Client {
const HASH_ALGORITHM = 'sha256';
@jezek
jezek / Makefile
Last active May 24, 2018 21:39
C++ program (with makefile) that writes to standart output product of 2 numbers from user input and then itself
all:
g++ main.cpp -o productWithItself