Skip to content

Instantly share code, notes, and snippets.

@DaaaaanB
DaaaaanB / AES_Example.go
Last active December 11, 2023 14:05 — forked from mickelsonm/main.go
A quick example of basic AES encryption using the Golang AES library.
/*
* FILE : AES_Example.go
* PROJECT : INFO-1340 - Block Ciphers
* PROGRAMMER : Daniel Pieczewski, ref: https://github.com/mickelsonm
* FIRST VERSION : 2020-04-12
* DESCRIPTION :
* The function(s) in this file make up example code for encryption and decryption of a block of text
* using the Golang standard library AES implementation using the Cipher Feedback mode of encryption (CFB).
* DISCLAIMER: There is no way that this a secure implementation of AES. This is only for my personal learning.
* So help you God if this ends up in some commercial application.
@ndbroadbent
ndbroadbent / Gemfile
Last active December 11, 2021 22:31
How to get accurate SimpleCov coverage with Spring in a Rails application
group :development, :test do
gem 'spring-commands-rspec', require: false
gem 'spring-watcher-listen', require: false
gem 'spring', require: false
# ...
end
@gbraad
gbraad / README.md
Last active March 27, 2020 04:35
Play video over NDI with VLC (command line)

Play video over NDI with VLC (command line)

C:\> vlc --vout=NDI --aout=NDI "c:\Users\gbraad\Videos\Trailer QFS.mp4"
@ipan
ipan / diff-jq.md
Created January 16, 2018 04:47
compare two JSONs with jq #json #jq
@limepanda
limepanda / kvm-migration.txt
Last active January 26, 2024 23:26
migrate qcow2 image to zfs volume
qemu-img convert -O raw <infile.(vdi|vmdk|$whatever)> /dev/zvol/rpool/data/<vmid>-disk0
@lightrush
lightrush / README.md
Created November 3, 2017 05:18
X11vnc Systemd Unit File

X11vnc Systemd Unit File

This Systemd unit file starts X11VNC on boot

  1. Set VNC password: sudo x11vnc -storepasswd [YOUR VNC PASSWORD] /etc/x11vnc.passwd
  2. Install Systemd Unit File
sudo cp [path to]/vnc.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable vnc.service
@LunaSquee
LunaSquee / queue.js
Last active February 16, 2023 01:52
Liquidsoap radio + youtube-dl queueing (Node.js as helper)
// $ node queue <file name or youtube URL>
const net = require('net')
let client = net.connect(1234, 'localhost')
client.on('connect', function () {
if (process.argv[2]) {
console.log('Queueing ' + process.argv[2])
client.write('queue.push smart:' + process.argv[2] + '\r\n')
}
const fs = require('fs');
const {
Puppet
} = require("matrix-puppet-bridge");
const puppet = new Puppet('/Users/ajohnson/matrixwork/rls/matrix-appservice-imessage/config.json');
puppet.startClient().then(()=>{
const client = puppet.getClient();
var obj = JSON.parse(fs.readFileSync(process.argv[2]))
@bfritscher
bfritscher / esp8266pzem.ino
Last active May 30, 2020 20:29
PZEM-004T Energy monitor with nodemcu esp8266 arduino
/* FOR COMMENTS PLEASE USE https://github.com/bfritscher/esp8266_PZEM-004T */
/* NOTIFICATION ARE NOT SENT BY EMAIL FOR GISTS :-( */
// VERSION 2 with WiFIManager integration for device_name
#include <FS.h> //this needs to be first, or it all crashes and burns...
#include <ESP8266WiFi.h> // ESP8266 Core WiFi Library (you most likely already have this in your sketch)
#include <Ticker.h> // for LED status
#include <DNSServer.h> // Local DNS Server used for redirecting all requests to the configuration portal