Skip to content

Instantly share code, notes, and snippets.

@zaxebo1
zaxebo1 / pixie.rs
Created July 20, 2023 10:04 — forked from timClicks/pixie.rs
Pixelate images in less than 50 lines of code
//! # pixie
//!
//! Pixelate images. This file provides the code demonstrated
//! in this video: <https://youtu.be/Q18vAySAiHc>
//!
//! Uses image 0.24.0 <https://docs.rs/image/0.24.6/image/>
use image::io::Reader as ImageReader;
use image::{GenericImageView, DynamicImage, ImageBuffer, Rgba};
@zaxebo1
zaxebo1 / Dockerfile
Created July 12, 2023 07:34 — forked from kesor/Dockerfile
Compile DENO on Alpine (w/MUSL C)
FROM rust:alpine
RUN apk add --no-cache \
bash \
binutils-gold \
ca-certificates \
clang \
curl \
g++ \
git \
@zaxebo1
zaxebo1 / geanywl
Created November 23, 2022 12:19 — forked from gkatev/geanywl
Geany editor: Wrapper for per-workspace instances, opening in most recently focused window, and more
#!/bin/bash
GEANY_PATH="/usr/bin/geany"
if [ -z "$XDG_RUNTIME_DIR" ]; then
[ -z "$XDG_CACHE_HOME" ] &&
XDG_CACHE_HOME="$HOME/.cache"
XDG_RUNTIME_DIR="$XDG_CACHE_HOME"
fi
@zaxebo1
zaxebo1 / rsync-backup.sh
Created October 20, 2022 23:00 — forked from jmar71n/rsync-backup.sh
incremental backup script for multiple computers and efficient use of disk space. Backups are based on a backup interval and no. of backups to keep.
#!/bin/bash
## incremental rsync backup script
## run hourly via cron, will take a back up every 24hrs for up to 7days.
## efficent use of space using hard links
## can handle computers been turned on / off
## executes n backup processes in parallel
# ------------- computers to backup -----------------------------------
# IP Address or fully qualified names here + remote backup directory
@zaxebo1
zaxebo1 / MainTest.hx
Created September 4, 2022 22:03 — forked from anissen/MainTest.hx
Haxe hxcpp cppia test
class MainTest {
static public function main() {
trace("Hello world!");
trace('Fibonacci of 7 is: ${fibonacci(7)}');
}
static function fibonacci(n) {
if (n == 0) return 0;
else if (n == 1) return 1;
@zaxebo1
zaxebo1 / timeEnabledJitsi.js
Created August 27, 2021 02:50 — forked from atfornes/timeEnabledJitsi.js
Jitsi : enable videoconference at a specific time
// using jitsi API: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-iframe
<script src='https://meet.jit.si/external_api.js'></script>
<script>
const domain = 'meet.jit.si';
const options = {
roomName: 'JitsiMeetAPIExample',
width: '1200px',
height: '800px',
parentNode: document.querySelector('#conference')
@zaxebo1
zaxebo1 / db_backup.sh
Created January 16, 2021 21:58 — forked from lucaswilric/db_backup.sh
Back up, compress and encrypt a small MySQL or PostgreSQL database.
#!/bin/bash
# This script dumps a database to SQL, compresses, encrypts and timestamps it, then saves it to Dropbox. Ideal for a cronjob.
# It uses symmetric encryption, so guard your password carefully.
#
# NOT RECOMMENDED FOR LARGE DATABASES!
# Dump a MySQL database
# Read this for how to get your password into mysqldump:
# https://dev.mysql.com/doc/refman/5.1/en/password-security-user.html
mysqldump -u username > database.sql
@zaxebo1
zaxebo1 / reclaimWindows10.ps1
Created December 29, 2020 14:54 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@zaxebo1
zaxebo1 / gist:e843dc8d6f8edc483aa65a3a3705d436
Created October 14, 2020 20:51 — forked from michalbcz/gist:2784124
groovy's AntBuilder and external ant tasks (example with Google Closure The JavaScript Compiler)
import groovy.grape.Grape;
// to explain why I am not using @Grape annotation
// see http://stackoverflow.com/questions/1641116/groovy-with-grape-and-antbuilder-classloader-problem
Grape.grab(
group: 'com.google.javascript',
module: 'closure-compiler',
version: 'r1918',
classLoader:this.class.classLoader.rootLoader /* needed because of ant.taskdef classloader */)