Skip to content

Instantly share code, notes, and snippets.

View rarguello's full-sized avatar

Ricardo Arguello rarguello

View GitHub Profile
@rarguello
rarguello / useradd.sh
Created June 1, 2022 22:55
Create a new user with the same ssh keys as another user and sudo privileges
#!/usr/bin/env bash
set -eu
EXISTING_USERNAME=${1}
USERNAME=${2}
sudo useradd ${USERNAME}
sudo mkdir /home/${USERNAME}/.ssh/
sudo chmod 700 /home/${USERNAME}/.ssh/
sudo cp /home/${EXISTING_USERNAME}/.ssh/authorized_keys /home/${USERNAME}/.ssh/authorized_keys
set ai nocp digraph ek hid ru sc vb wmnu noeb noet nosol
set bs=2 fo=cqrt ls=2 shm=at tw=72 ww=<,>,h,l
set comments=b:#,:%,n:>
set list listchars=tab:»·,trail:·
set viminfo=%,'50,\"100,:100,n~/.viminfo
@rarguello
rarguello / RPM-GPG-KEY-katello
Created July 17, 2017 04:46
RPM-GPG-KEY-katello for Katello Client 3.4
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFkZ5LQBCADCXuOKAleD+aGt5XptjVqlaAmHNwOXIBFXIJidRYJsnkth1oLT
dBOsXHiWQwh+3lCFrWTI1DwsrTk21uldSCes1THRDl/+eVpa0SWi15QpbotU13DA
DS+pHH6pIp9TGnAOtA8AUcKf7BCFDpVF8mpuzz4Zt51iDdnuP2O4ZG7a0UKRZM2C
trR+2l01kkqMLxhiV5hvfT582ZcMdXvjeQCswH4lmfOZ01YFb8Hu8Uslip2xdkik
e+f0l8WMmF88MpwLYQQkIRqXSbSY9msz/O+/SJJhYC+UwgMPfJf3Qmo203dSLwMe
rAB0Mtl//FPW7fcQurJKZlh12Ezni6F989+rABEBAAG0KkthdGVsbG8gMy40IDxm
b3JlbWFuLWRldkBnb29nbGVncm91cHMuY29tPokBPgQTAQIAKAUCWRnktAIbAwUJ
@rarguello
rarguello / mirrors.txt
Created November 29, 2016 18:26
DeskOS: How we make our ISO available from mirrors in https://deskos.download (/srv/deskos.download/mirrors.txt) 2/2
random_server mirror.cedia.org.ec|mirror.uta.edu.ec|mirror.espoch.edu.ec|mirror.ueb.edu.ec|mirror.epn.edu.ec
@rarguello
rarguello / deskos.download.conf
Created November 29, 2016 18:25
DeskOS: How we make our ISO available from mirrors in https://deskos.download (/etc/httpd/conf.d/deskos.download.conf) 1/2
<VirtualHost *:80>
ServerName deskos.download
ServerAlias www.deskos.download
DocumentRoot /srv/deskos.download
<Directory /srv/deskos.download>
Require all granted
AllowOverride None
Options Indexes FollowSymLinks
</Directory>
@rarguello
rarguello / centos-mirror.conf
Created November 25, 2016 17:49
CentOS mirror Virtual Host (/etc/httpd/conf.d/centos-mirror.conf)
<VirtualHost *:80>
ServerName centos-mirror.example.com
ServerAlias mirrorlist.centos.org
DocumentRoot /srv/mirrors/centos-mirror
<Directory "/srv/mirrors/centos-mirror">
AllowOverride None
AddHandler cgi-script .cgi
DirectoryIndex index.cgi index.html
Options Indexes FollowSymLinks ExecCGI
@rarguello
rarguello / index.cgi
Created November 25, 2016 16:54
Host an internal CentOS mirror by pointing "mirrorlist.centos.org" to an Apache Virtual Host with this index.cgi
#!/usr/bin/perl
use LWP::Simple qw(!head);
use CGI qw(:standard);
print "Content-type: text/plain; charset=iso-8859-1\n\n";
my $cgi = CGI->new();
my $release = $cgi->param('release');
my $release_s = $release;
$release_s =~ s/(\d)(.+)?/$1/;

Keybase proof

I hereby claim:

  • I am rarguello on github.
  • I am ricardoarguello (https://keybase.io/ricardoarguello) on keybase.
  • I have a public key whose fingerprint is 82A8 54F8 4E66 FA8B 83BD 1627 E8DA E65B 7568 D425

To claim this, I am signing this object:

@rarguello
rarguello / .bash_profile
Last active December 31, 2015 20:39
Show Git info in your bash prompt in Fedora. Add at the end of ~/.bash_profile
source /usr/share/git-core/contrib/completion/git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE="true"
export GIT_PS1_SHOWUNTRACKEDFILES="true"
export PS1='\[\033[01;32m\]\h\[\033[01;34m\] \W\[\033[31m\]$(declare -F __git_ps1 &>/dev/null && __git_ps1 " (%s)") \[\033[01;34m\]$\[\033[00m\] '
ironjacamar-1.0.9.Final/tools/tattletale/lib/tattletale-ant.jar
ironjacamar-1.0.9.Final/tools/tattletale/lib/javassist.jar
ironjacamar-1.0.9.Final/tools/tattletale/lib/tattletale.jar
ironjacamar-1.0.9.Final/tools/cobertura/lib/cobertura.jar
ironjacamar-1.0.9.Final/tools/cobertura/lib/asm-tree-3.0.jar
ironjacamar-1.0.9.Final/tools/cobertura/lib/log4j-1.2.9.jar
ironjacamar-1.0.9.Final/tools/cobertura/lib/asm-3.0.jar
ironjacamar-1.0.9.Final/tools/cobertura/lib/jakarta-oro-2.0.8.jar
ironjacamar-1.0.9.Final/tools/checkstyle/lib/commons-cli.jar
ironjacamar-1.0.9.Final/tools/checkstyle/lib/antlr.jar