This file contains 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 python | |
""" | |
Returns a random command's manpage | |
Author: Guillermo Robles | |
""" | |
import commands | |
import random | |
import os |
This file contains 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
IMAGE_X_SIZE=483 | |
IMAGE_Y_SIZE=511 | |
OFFSET=5 | |
convert -define jpeg:size="$(( $IMAGE_X_SIZE - $OFFSET))x$(( $IMAGE_Y_SIZE - $OFFSET))" base.jpg[$(( $IMAGE_X_SIZE - $OFFSET))x$(( $IMAGE_Y_SIZE - $OFFSET))+0+0] animate-0.jpg | |
convert animate-0.jpg -page +0+0 lettering.png -flatten animate-0.jpg | |
convert -define jpeg:size="$(( $IMAGE_X_SIZE - $OFFSET))x$(( $IMAGE_Y_SIZE - $OFFSET))" base.jpg[$(( $IMAGE_X_SIZE - $OFFSET))x$(( $IMAGE_Y_SIZE - $OFFSET))+0+$OFFSET] animate-1.jpg | |
convert animate-1.jpg -page +0+0 lettering.png -flatten animate-1.jpg |
This file contains 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
# Remember to copy your public key to the server (ssh-copy-id) before executing this, or you'll lose access to it. | |
# Also, be sure to either execute a command with sudo before (something like 'sudo ls' is enough) to prevent sudo asking for the password on every command | |
sudo sed -i 's/PermitRootLogin .*/PermitRootLogin no/' /etc/ssh/sshd_config | |
sudo sed -i 's/#PermitEmptyPasswords .*/PermitEmptyPasswords no/' /etc/ssh/sshd_config | |
sudo sed -i 's/#PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config | |
# Remember to add an AllowUsers clause, with the correct users and network. Example: | |
# sudo sh -c 'echo "AllowUsers [email protected]/16" >> /etc/ssh/sshd_config |
This file contains 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
# Install the necessary VLAN packages and configuration | |
# Install package | |
sudo apt-get install -y vlan | |
# Load the kernel module | |
sudo modprobe 8021q | |
# Add the module to load at system boot (If it isn't already) | |
grep '^8021q$' /etc/modules 2>/dev/null 1>&2 || sudo sh -c 'echo "8021q" >> /etc/modules' | |
echo "I recommend rebooting" |
This file contains 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
\documentclass[11pt,a4paper]{article} | |
% Declare the new flag | |
\newif\ifspanish | |
% To set the flag, now you use: | |
% \spanishtrue | |
% \spanishfalse | |
% To check the value, the construct is | |
% \ifspanish | |
% Value if true |