Skip to content

Instantly share code, notes, and snippets.

@Jetchisel
Jetchisel / gist:7908004
Last active November 15, 2018 15:18
Some sort of progress output for dd
## Run dd in the background and save it's PID in the pid variable. Increase the bs if needed.
## Replace the "source" and "destination" of course!
dd if=source of=destination bs=4M & pid=$!
## It should give you your shell back. When it does, run the code below.
while ((pid)); do kill -USR1 "$pid" 2>/dev/null || break; sleep 5; done
while read -ra line; do [[ ${line[0]} = @(zion|yaw|creed8) ]] && command wondersharper "${line[1]}" 960 960; done < OnlineUsers
#!/bin/bash
mapfile -t special_users < n.txt
printf -v users '%s|' "@(${Online_Users[@]})"
users=${users%%|}
#!/bin/bash
mapfile -t special_users < specia_users.txt
printf -v users '%s|' "@(${Online_Users[@]})"
users=${users%%|}
#!/bin/bash
mapfile -t special_users < specia_users.txt
printf -v users '%s|' "@(${special_users[@]})"
users=${users%%|}
#!/bin/bash
shopt -s extglob
mapfile -t special_users < specia_users.txt
printf -v users '%s|' "@(${special_users[@]})"
users=${users%%|}
#!/bin/bash
shopt -s extglob
mapfile -t special_users < specia_users.txt
printf -v users '%s|' "@(${special_users[@]})"
users=${users%%|}
@Jetchisel
Jetchisel / 31_hold_shift
Last active June 14, 2021 11:48
31_hold_shift
#! /bin/sh
set -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#!/usr/bin/env bash
# ============================================================================================ #
#: Title : VBoxAutoSave #
#: Sypnosis : VBoxAutoSave #
#: Date Created : Mon Jul 29 23:25:50 PHT 2013 #
#: Last Edit : Sat May 24 20:46:17 PHT 2014 / Sat May 24 12:46:17 UTC 2014 #
#: License : GPLv3 #
#: Version : 1.0 #
#: Author : Jason V. Ferrer '<jetchisel@opensuse.org>' #
@Jetchisel
Jetchisel / download13.2
Created November 4, 2014 01:36
script to download 13.2 iso
#!/bin/bash
isolink='http://195.135.221.134/distribution/13.2/iso/openSUSE-13.2-DVD-x86_64.iso'
nseconds=5
directory=$HOME/Downloads/13.2
until wget --spider "$isolink" >/dev/null 2>&1; do
echo '13.2 iso is still not available'
sleep "$nseconds"