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 | |
function process_file() { | |
movie_file="$1" | |
echo "Checking $movie_file" | |
if ffprobe -v error -show_format -select_streams a:0 -show_streams "$movie_file" | grep "language=und"; then | |
echo "Movie audio undefined: updating $movie_fil ( do not CTRL+C )" # remove .bak file if exist | |
# Create a backup | |
backup_file="${movie_file}.bak" | |
echo "Creating backup $backup_file" |
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
#Download all .ipa and .apk files from artefact | |
wget 'http://artefacts.endpoint/path' -nH --cut-dirs=2 -r -np -nc -q -A ipa,apk -P './path/destination' |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import hashlib | |
import base58 | |
def sha256(hexstr): | |
"""sha256 hash algorithm | |
""" |
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
<html> | |
<head> | |
<!-- | |
@author kdssoftware | |
@created at 3/29/2022 | |
@contact kdssoftware.com | |
Beware: this will only work in practice if you have an api call `/api/search?search=value` set up | |
--> |
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 | |
MACHINENAME=$1 | |
# Starts a new machine with 20GB RAM and 150GB DISK | |
# basepath /mnt/kiko | |
# Download debian.iso | |
if [ ! -f ./debian.iso ]; then | |
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.6.0-amd64-netinst.iso -O debian.iso | |
fi | |
sudo mkdir /mnt/kiko/$MACHINENAME |
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
DROP TABLE IF EXISTS item, inventory_item, "order", order_tags, order_payment, | |
order_shipping, shipping_address, address_name, order_cost, | |
order_disp_cost, order_item, store, "user", order_has_order_item; | |
CREATE TABLE IF NOT EXISTS item ( | |
"no" TEXT NULL, | |
"name" TEXT NULL, | |
"type" TEXT NULL, | |
category_id NUMERIC NULL, | |
fyrebrick_id SERIAL, |
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
/** | |
* component last updated by Karel De Smet 27/08/2021 | |
* ------------------------ (github.com/snakehead007) | |
* | |
* How to use: | |
* -- | |
* add to an input element 1 or more checkers to its class and add a data- accordingly | |
* e.g. `<input id="some-text" class="form_checker-is_empty" data-is_empty="this message will be shown when its empty"/>` | |
* | |
* the error message will be shown where the id prefix is the same as the input id. |
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
let autoRotate = async (JimpImage) =>{ | |
switch(JimpImage._exif.tags?.Orientation||1){ | |
case 2: | |
await JimpImage.flip(true,false); | |
break; | |
case 3: | |
await JimpImage.rotate(180); | |
break; | |
case 4: | |
await JimpImage.rotate(180).flip(true,false); |
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
<?php | |
class env | |
{ | |
//usage: | |
//env::$load() // loads .env file | |
//env::$load("dev") //loads dev.env file | |
//CAUTION! : at an empty line after the last variable entry. see example below | |
public static function load ($prefix="") { | |
$file = file($_SERVER['DOCUMENT_ROOT'].'/ici/'.$prefix.'.env'); | |
foreach ($file as $line_num => $line) { |
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
use admin | |
db.createUser( | |
{ | |
user: "root", | |
pwd: "root", | |
roles:["root"] | |
} | |
); | |
use demo |
NewerOlder