Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -x
exec 1>/tmp/test 2>/tmp/test
if [ $# -lt 1 ]
then
echo "Usage: $(basename $0) executable_name"
exit 1
fi
├── generic
│   ├── cfg
│   │   └── base.cfg
│   ├── __init__.py
│   └── tests
│   ├── cfg
│   │   ├── yum_install.cfg
│   │   └── yum_update.cfg
│   ├── __init__.py
│   ├── utils.py
@farosas
farosas / chroot-nbd
Last active February 5, 2025 09:13
Script to use qemu-nbd to edit a locked image (cloud-init)
#!/bin/bash
MOUNTPOINT=/mnt/tmp_nbd
IMAGE=$1
PARTITION=${2:-/dev/nbd0p1}
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
<domain type='kvm'>
<name>fedoraserver1</name>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>1</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64'>hvm</type>
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /*only needed once*/
#PersonalToolbar[moz-collapsed="true"] { visibility: visible !important; }
@farosas
farosas / .bashrc
Last active April 20, 2021 22:32
guest
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias gls='git status'
alias ls='ls --color=auto'
alias grep='grep --color=auto'
@farosas
farosas / bib.patch
Created December 17, 2014 19:02
bib.patch
diff -uNr abntex2/abntex2-alf.bst abntex2.new/abntex2-alf.bst
--- abntex2/abntex2-alf.bst 2014-12-17 16:53:02.400206788 -0200
+++ abntex2.new/abntex2-alf.bst 2014-12-17 16:59:12.226889659 -0200
@@ -2113,7 +2113,7 @@
#3 'abnt.etal.cite :=
#3 'abnt.etal.list :=
"et al." 'abnt.etal.text :=
- #0 'abnt.full.initials :=
+ #1 'abnt.full.initials :=
#0 'abnt.last.names := %#0 abnt-style, #1 bibtex-style
@farosas
farosas / test.bib
Last active August 29, 2015 14:07
Resumo #10
@misc{uppaal,
title = {{UPPAAL}},
url = {http://uppaal.org/},
year=2014,
urldate = {2014-07-28},
file = {UPPAAL:/home/fabiano/.zotero/zotero/ru3nfjod.default/zotero/storage/J6WAE649/uppaal.org.html:text/html}
}
@misc{this,
author={Aluno, Nome do},