Skip to content

Instantly share code, notes, and snippets.

@zaxebo1
zaxebo1 / jinjava.md
Created July 14, 2020 02:32 — forked from raprasad/jinjava.md
jinjava example
  • pom.xml
 <dependency>
               <groupId>com.hubspot.jinjava</groupId>
               <artifactId>jinjava</artifactId>
               <version>2.2.0</version>
             </dependency>
@zaxebo1
zaxebo1 / A.markdown
Created September 6, 2020 23:45 — forked from larrybotha/A.markdown
Merge wiki updates that are on a fork of your repo.

Merge Wiki Changes From A Forked Github Repo

This is inspired (or basically copied) from How To Merge Github Wiki Changes From One Repository To Another, by Roman Ivanov, and serves to ensure that should something happen to the original article, the information remains nice and safe here.

Terminology

OREPO: original repo - the repo created or maintained by the owner

FREPO: the forked repo that presumably has updates to its wiki, not yet on the OREPO

@zaxebo1
zaxebo1 / Gtk3Demo.kt
Created September 26, 2020 05:21 — forked from kropp/Gtk3Demo.kt
GTK+ Demo Application in Kotlin/Native rewritten in OO-style
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@zaxebo1
zaxebo1 / submit_acoustid_fingerprint.py
Created September 28, 2020 17:52 — forked from pirtleshell/submit_acoustid_fingerprint.py
Easily create a musical fingerprint from an MP3 and submit it to AcoustId with musicbrainz recording id (must be embedded in MP3).
import acoustid # the library for creating the fingerprints
import urllib.request # for sending the request to AcoustId's server
from mutagen.id3 import ID3 # for extracting the musicbrainz recording id
def main():
api_key = YOUR_API_KEY # find it at https://acoustid.org/api-key
path = '/path/to/directory/of/music'
songs = ['song1.mp3', 'anothersong.mp3'] # an array of the songs in that path
paths = [path + song for song in songs]
for i,song in enumerate(paths):
@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 */)
@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 <[email protected]>
# Modified by: alirobe <[email protected]> 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 / 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 / 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 / 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 / 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