This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# depends: dmenu slop xdotool | |
# assumes next spawned window will be floating/moveable by xdotool. | |
# get program name to launch using dmenu cache: | |
cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"} | |
if [ -d "$cachedir" ]; then | |
cache=$cachedir/dmenu_run | |
else | |
cache=$HOME/.dmenu_cache # if no xdg dir, fall back to dotfile in ~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR_BKPS=/pasta | |
BKP="$(find $DIR_BKPS -maxdepth 1 -type f -mtime +4 -name \*.extension)" | |
for x in $BKP; do | |
echo "Removendo: " $x | |
rm $x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Script de backup de banco postgresql | |
#DATA=`date +%d-%m-%Y` | |
DATA=`date +%Y-%m-%d` | |
/usr/local/src/postgresql-9.2.5/src/bin/pg_dump/pg_dump -U postgres -f /pasta/destino/arquivo_$DATA.backup -F c -v pasta > /pasta/backups/log_$DATA.log 2>&1 & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Repositórios centOs 6 para instalar o gitlab | |
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
wget -O /etc/yum.repos.d/aredridel.repo \ | |
http://ftp5.gwdg.de/pub/opensuse/repositories/home:/aredridel/CentOS_CentOS-6/home:aredridel.repo | |
rpm -Uvh http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm | |
rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-11.ius.el6.noarch.rpm | |
rpm -Uvh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm | |
wget -O /etc/yum.repos.d/PUIAS_6_computational.repo https://gitlab.com/gitlab-org/gitlab-recipes/raw/master/install/centos/PUIAS_6_computational.repo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dependencias: | |
OpenJDK | |
# Baixar a versao atual e descompactar tar xvzf nexus-2.12.1-01-bundle.tar.gz | |
#Colocar os arquivos do tar.gz onde você desejar. | |
$ sudo cp nexus-2.12.1-01-bundle.tar.gz /usr/local | |
$ cd /usr/local | |
$ sudo tar xvzf nexus-2.12.1-01-bundle.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
#Buscar arquivos com a extensão *.backuṕ (ou outra qualquer) de 5 dias anteriores a data presente e os remove | |
#Pasta onde estão os arquivos | |
PathFiles=/../.. | |
find_files() { find "$1" -maxdepth 1 -mtime "$2" -type f -iname '\*.backup'; } | |
# Modificando o parâmetro -mtime para +4 do find_files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The loopback network interface | |
auto lo | |
iface lo inet loopback | |
# The primary network interface | |
allow-hotplug eth0 | |
# comment out | |
#iface eth0 inet dhcp | |
# add follows | |
iface eth0 inet static |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker pull postgres | |
mkdir /opt/pg_data | |
docker run --name=postgres -e POSTGRES_PASSWORD=supersecretpassword \ | |
-v /opt/pg_data:/var/lib/postgresql/data \ | |
-d postgres | |
Then run owncloud linked to postgres container: | |
docker run --name oc -p 80:80 -p 443:443 --link=postgres \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/sysconfig/network | |
NETWORKING=yes | |
HOSTNAME=your-hostname | |
GATEWAY=your-gateway (see with route -n) | |
NETWORKING_IPV6=no | |
IPV6INIT=no | |
#/etc/sysconfig/network-scripts/ifcfg-your-network add | |
DNS1=your-dns1 | |
DNS2=your-dns2 |
OlderNewer