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
| server { | |
| listen 80; | |
| listen [::]:80 default ipv6only=on; | |
| server_name chat.ataliba.net; | |
| rewrite ^ https://$server_name$request_uri? permanent; | |
| add_header Strict-Transport-Security max-age=31536000; | |
| location / { |
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
| gpuf () { | |
| # git pull -f $1 | |
| remote=${1:?"need remote to force pull from"} | |
| current_branch=$(git symbolic-ref -q HEAD) | |
| current_branch=${current_branch##refs/heads/} | |
| current_branch=${current_branch:-HEAD} | |
| if [ $current_branch = 'HEAD' ] ; then | |
| echo | |
| echo "On a detached head. Exiting..." |
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 | |
| ############################################### | |
| # | |
| # Nagios script to check Exim mail queue status | |
| # | |
| # Copyright 2007, 2008 Ian Yates | |
| # | |
| # NOTE: Depending on your config, the nagios user will probably be | |
| # needed to be added to the exim group for this script to function correctly | |
| # |
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
| sqlite2 /path/to/mysqlite2.db .dump > backupfile | |
| sqlite3 /path/to/mynewsqlite3.db < backupfile |
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 | |
| HOST=$1 | |
| WGET="/usr/bin/wget" | |
| $WGET -q --tries=10 --timeout=5 $HOST | |
| RESULT=$? | |
| if [[ $RESULT -eq 0 ]]; then | |
| echo "Connection made successfully to $HOST" |
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/env python | |
| import poplib | |
| from email import parser | |
| import email | |
| import os | |
| import sys | |
| import string | |
| import re |
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
| zzservices() | |
| { | |
| grep ^$1 /etc/services | |
| } |
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
| # Para entender a recursividade veja o final deste arquivo | |
| No final do arquivo : | |
| # Para entender a recursividade veja o início deste arquivo |
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
| # ---------------------------------------------------------------------------- | |
| # Inverte a string passada como parâmetro para o comando | |
| # Uso: zzinverte | |
| # Ex.: zzinverte string | |
| # | |
| # Autor: Ataliba Teixeira, www.ataliba.eti.br | |
| # Desde: 2012-04-30 | |
| # Versão: 1 | |
| # Licença: GPL | |
| # ---------------------------------------------------------------------------- |
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
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| string Exec(const char *cmd); | |
| void ReplaceAll(string& str, const string& from, const string& to); | |
| int main(int argc, char **argv, char **envp) { | |
| string whoami, users; |