I provide you with 3 jq lib functions that will help you in converting between snake_case and CamelCase.
I want to change keys in my json from camelcase to snake_case.
#/bin/bash | |
# apt-get update && apt-get install cdparanoia lame | |
cdparanoia -B && \ | |
for file in *.wav; do lame -V0 "$file" "${file/%wav/mp3}"; done && \ | |
rm *.wav && \ | |
eject |
package main | |
import ( | |
"fmt" | |
"log" | |
"strconv" | |
"github.com/miekg/dns" | |
) |
notify: | |
if: always() | |
name: Notify | |
needs: | |
- job1 | |
- job2 | |
- job11 | |
- job3 | |
- job4 | |
runs-on: ubuntu-latest |
#!/bin/bash | |
BITLOCKER_PARTITION="${1}" | |
BITLOCKER_PASSWORD="${2}" | |
function usage() { | |
echo "$(basename ${0}) <partition> <password>" | |
echo "Unlocks and mounts a bitlocker partition as read-only" | |
} | |
if [ -z "${BITLOCKER_PARTITION}" ] |
echo "****************************************************" | |
echo "* *" | |
echo "* CONVERT BARE REPO TO NORMAL REPO *" | |
echo "* *" | |
echo "****************************************************" | |
echo " -> untar repo.tar.gz" | |
tar -zxf repo.tar.gz | |
for user in $(ls repositories/); do | |
for repo in $(ls repositories/$user/); do | |
pathRepo="repositories/$user/$repo/"; |
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: zram | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Increased Performance In Linux With zRam (Virtual Swap Compressed in RAM) | |
# Description: Adapted from systemd scripts at https://github.com/mystilleef/FedoraZram | |
### END INIT INFO |
#!/bin/bash | |
for i in {1..10}; | |
do | |
openssl req -x509 -new -sha256 -nodes \ | |
-out "cert-$i.der" \ | |
-outform DER \ | |
-newkey rsa:2048 \ | |
-keyout "cert-$i.key" \ | |
-config <( |
[Unit] | |
Description=Scheduled Reboot | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/systemctl --force reboot |
# General configuration. | |
# $ tmux show-options -g | |
set -g base-index 1 | |
set -g display-time 5000 | |
set -g repeat-time 1000 | |
set -g status-keys vi | |
set -g status-bg black | |
set -g status-fg white | |
set -g status-justify left | |
set -g status-interval 1 |