Skip to content

Instantly share code, notes, and snippets.

View jnbdz's full-sized avatar
👨‍💻
None stop

JN Σ jnbdz

👨‍💻
None stop
View GitHub Profile
#!/usr/bin/env bash
#
#/ rmcontainer helps remove obstinate containers that are not easily removed by *podman rm* command.
#/
#/ Usage: rmcontainer [OPTONS] [[PATH] [CONTAINER ID]]
#/
#/ OPTIONS:
#/
#/ General options:
#/
var win = window,
doc = document,
docElem = doc.documentElement,
body = doc.getElementsByTagName('body')[0],
x = win.innerWidth || docElem.clientWidth || body.clientWidth,
y = win.innerHeight|| docElem.clientHeight|| body.clientHeight;
alert(x + ' × ' + y);
#!/usr/bin/bash
echo -ne '##### (33%)\r'
sleep 1
echo -ne '############# (66%)\r'
sleep 1
echo -ne '####################### (100%)\r'
echo -ne '\n'
@jnbdz
jnbdz / convertAll.sh
Created May 12, 2022 05:39
I needed a quick little script to convert my iPhone HEIC files (image format from Apple) to jpg image format (works like a charm).
#!/usr/bin/bash
comvertAll() {
local heicFiles=$(ls ./106APPLE | grep -i heic)
for heicFile in ${heicFiles}
do
convert ./106APPLE/${heicFile} ./106APPLE-JPG/${heicFile}.jpg
done
}
comvertAll
Index: build.gradle
===================================================================
--- build.gradle (révision 1802325)
+++ build.gradle (copie de travail)
@@ -42,7 +42,8 @@
ext.pluginsDir = "${rootDir}/plugins"
// java settings
-def jvmArguments = ['-Xms128M', '-Xmx1024M']
+def jvmArguments = [System.getenv("OFB_MEM_XMS")?: '-Xms128M',
@jnbdz
jnbdz / registries.conf
Created March 21, 2022 00:28
sudo vim /etc/containers/registries.conf
[registries.search]
registries = ['docker.io', 'quay.io', 'registry.fedoraproject.org', 'registry.access.redhat.com']
# If you need to access insecure registries, add the registry's fully-qualified name.
# An insecure registry is one that does not have a valid SSL certificate or only does HTTP.
[registries.insecure]
registries = []
# If you need to block pull access from a registry, uncomment the section below
kex stop
kex --win -s
@jnbdz
jnbdz / xstartup
Created February 24, 2022 16:54
For win-kex
#!/bin/sh
#############################
## All ##
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export SHELL=/bin/bash
export XDG_SESSION_TYPE=x11
export GDK_BACKEND=x11
0000000000004030 B __bss_start
0000000000004030 b completed.7325
w __cxa_finalize@@GLIBC_2.2.5
0000000000004020 D __data_start
0000000000004020 W data_start
0000000000001080 t deregister_tm_clones
00000000000010f0 t __do_global_dtors_aux
0000000000003df0 t __do_global_dtors_aux_fini_array_entry
0000000000004028 D __dso_handle
0000000000003df8 d _DYNAMIC
#!/bin/bash
# cat decode_key.txt | grep -E "^WND \|" | awk -F"|" '{ print $2 }' | sed 's/^ //'
get_metar_taf() {
local tmp_metartaf_path="metar-taf-$(date +%y%m%d%H%M%S).txt"
curl -X POST -s -d 'Langue=anglais&zone=33&NoSession=NS_Inconnu&checkbox=CYUL&format=raw&Checkbox=' https://flightplanning.navcanada.ca/cgi-bin/Fore-obs/metar.cgi | sed ':a;N;$!ba;s/\n/ /g' > /tmp/${tmp_metartaf_path}