Skip to content

Instantly share code, notes, and snippets.

View Mstaaravin's full-sized avatar

Mstaaravin Mstaaravin

View GitHub Profile
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: false
dhcp6: false
eth1:
#!/bin/sh
# https://devtidbits.com/2015/11/30/add-to-and-change-ubuntus-motd/
printf " $(tput -T xterm bold)Name:$(tput -T xterm sgr0) $(hostname)\n"
printf " $(tput -T xterm bold)Role:$(tput -T xterm sgr0) {{ ROLE }}\n"
printf "\n"
printf " $(tput -T xterm bold)Services running on this server:\n$(tput -T xterm sgr0)"
printf " $(tput -T xterm bold)$(tput -T xterm setaf 6)awswatcher$(tput -T xterm sgr0) this service checks uploads from {{ ENV }}admin.domain.net on folder /home/{{ ENV }}{{ ROLE }}/api/public/media/uploads\"\n"
printf "\n"
@Mstaaravin
Mstaaravin / caja-insync.sh
Created March 22, 2019 15:27
caja-insync emblem icon size
#!/bin/bash
# https://forums.insynchq.com/t/change-check-mark-icon-size-in-caja/7392/8
ICON_SIZES=(8x8 16x16 22x22 24x24 32x32 36x36 42x42 48x48 72x72 96x96)
temp=$(mktemp -d)
pushd "$temp"
for icon_size in "${ICON_SIZES[@]}"; do
mkdir $icon_size
@Mstaaravin
Mstaaravin / interfaces
Created September 18, 2016 03:24
service on interfaces
iface tun0 inet manual
pre-up ip route delete 172.18.0.0/16 || true
pre-up service openvpn start || true
post-down service openvpn stop
post-down ip route add blackhole 172.18.0.0/16 || true
#!/bin/sh
#
# Copyright (c) 2015, Grogdor.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
@Mstaaravin
Mstaaravin / mail-transport-agent
Created March 5, 2015 00:43
post: Múltiples IPs utilizando iproute en Debian
forest:~# aptitude show mail-transport-agent
No current or candidate version found for mail-transport-agent
Package: mail-transport-agent
State: not a real package
Provided by: citadel-mta, courier-mta, dma, esmtp-run, exim4-daemon-heavy, exim4-daemon-light, masqmail, msmtp-mta, nullmailer, postfix, sendmail-bin, ssmtp, xmail
@Mstaaravin
Mstaaravin / interfaces_2
Last active August 29, 2015 14:16
post: Múltiples IPs utilizando iproute en Debian
auto eth0
iface eth0 inet manual
pre-up ip link set eth0 up
post-up ip addr add 190.139.257.1/28 dev eth0
post-up ip addr add 190.139.257.2/28 dev eth0
post-up ip route add default via 190.139.257.14 dev eth0
@Mstaaravin
Mstaaravin / interfaces_1
Created March 5, 2015 00:34
post: Múltiples IPs utilizando iproute en Debian
auto eth0
iface eth0 inet static
address 190.139.257.1
netmask 255.255.255.240
network 190.139.257.0
broadcast 190.139.257.15
gateway 190.139.257.14
@Mstaaravin
Mstaaravin / virsh net-dumpxml default.sh
Created February 14, 2015 02:13
post: Laboratorio iPXE Flisol 2014
root@lhome:~# virsh net-dumpxml default
<network>
<name>default</name>
<uuid>5a014735-f658-7a87-c7d4-e6b0f488c332</uuid>
<forward mode='nat'/>
<bridge name='virbr0' stp='on' delay='0' />
<mac address='52:54:00:B5:24:7B'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<tftp root='/home/tftp' />
<dhcp>
@Mstaaravin
Mstaaravin / virsh net-edit default.sh
Last active August 29, 2015 14:15
post: Laboratorio iPXE Flisol 2014
root@lhome:~# virsh net-edit default