Skip to content

Instantly share code, notes, and snippets.

Avatar
❤️‍🔥

Zibri Zibri

❤️‍🔥
View GitHub Profile
@Zibri
Zibri / ubuntu_bluez_midi.sh
Created March 6, 2022 12:08
Bash script to recompile bluez on Linux
View ubuntu_bluez_midi.sh
#!/bin/bash
#
# Bash script to recompile bluez on Linux
# Tested on Ubuntu 20.04
sudo apt-get update
cd /tmp
sudo apt-get install -y libudev-dev libical-dev libreadline-dev libdbus-1-dev libasound2-dev build-essential
apt-get build-dep bluez
apt-get source bluez
@Zibri
Zibri / reset.css
Created November 27, 2021 14:38
CSS Reset
View reset.css
/*
1. Use a more-intuitive box-sizing model.
*/
*, *::before, *::after {
box-sizing: border-box;
}
/*
2. Remove default margin
*/
* {
@Zibri
Zibri / 24c256br.c
Created August 28, 2021 11:09
24c256 backup and restore
View 24c256br.c
/*
Utility to dump and restore a 24c256 eeprom.
(Changing the defines it will work with other eeproms too.)
Remember that 24c256 has 16 bit addressing.
Smaller ones have 8 bit addressing.
By Zibri.
@Zibri
Zibri / dump_i2c_eeprom.c
Last active August 27, 2021 16:27 — forked from gquere/dump_i2c_eeprom.c
dump I2C EEPROM memory from Linux device ioctl
View dump_i2c_eeprom.c
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/i2c-dev.h>
#define READ_SIZE (256)
#define NB_PAGES (128)
@Zibri
Zibri / megarefresh.sh
Last active July 26, 2021 14:33
Refresh MEGA.NZ accounts from expiring.
View megarefresh.sh
#!/bin/bash
# install megacmd from mega.nz first.
# put your usernames and passwords
# run this once a month :D
while read a b;do
mega-login &>/dev/null $a $b && mega-logout &>/dev/null && echo refreshed $a || echo error $a
done <<EOF
email1 password1
email2 password2
@Zibri
Zibri / bars.s
Created May 8, 2020 14:35
Vertical bars record by Zibri/RamJam
View bars.s
;---------------------------------------
; Vertical Bars
; By Zibri/RamJam 2020
;---------------------------------------
.ORG $2f5
boot
SEI
newline TSX
@Zibri
Zibri / paste_this_in_js_console.js
Last active April 19, 2022 23:59
Minimal javascript IRC client in console
View paste_this_in_js_console.js
function irc(nickname, server, chan, onmsg, onjoin) {
nickname = nickname || "nick_" + new Date().getTime().toString(36) + new Date().getMilliseconds().toString(36)
chan = chan || "Z" + new Date().getTime().toString(18) + Math.random().toString(36).substring(2)
server = server || "irc.unrealircd.org"
var init = 0
var ws = new WebSocket("wss://" + server);
var s = (c,l)=>setTimeout(console.log.bind(this, "%c%s", "font-size: 14px; color:" + c, new Date().toLocaleString("it") + ": " + l))
ws.onmessage = m=>{
if (m.data.indexOf("PING") == 0)
ws.send(m.data.replace("PI", "PO"));
@Zibri
Zibri / KMS_office.cmd
Created January 18, 2020 15:59 — forked from CHEF-KOCH/KMS_office.cmd
KMS server Windows
View KMS_office.cmd
@echo off
title Microsoft Office 2019 versions are supported!&cls&echo
============================================================================&echo
#Project: Activating Microsoft software products for FREE without software&echo
============================================================================&echo.&echo
#Supported products:&echo - Microsoft Office Standard 2019&echo - Microsoft Office Professional Plus 2019&echo.&echo.&(if exist
"%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist
"%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b
..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&(for /f %%x in ('dir /b
..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&echo.&echo
@Zibri
Zibri / crt.css
Last active April 2, 2023 13:02
CRT effect with flickering scanlines and RGB grid.
View crt.css
// CRT effect with flickering scanlines and RGB grid.
// By zibri@zibri.org
// <html class="crt"> </html>
@keyframes flicker {
50% {
top: -3px
}
}
@Zibri
Zibri / gitclean.sh
Last active March 28, 2021 00:10
Bash script to remove all revisions from github or gist repository.
View gitclean.sh
#!/bin/bash
#
# By Zibri (2019)
#
# Usage: gitclean username password giturl
#
gitclean ()
{
odir=$PWD;
if [ "$#" -ne 3 ]; then