This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! # 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}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM rust:alpine | |
RUN apk add --no-cache \ | |
bash \ | |
binutils-gold \ | |
ca-certificates \ | |
clang \ | |
curl \ | |
g++ \ | |
git \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## | |
# 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 ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */) |
NewerOlder