w
: show who is logged on and what they are doingwho
: show who is logged ontty
: show current users pseudo terminalps -ft pts/1
: get process id for the pseudo terminalpkill
: signal process based on name and other attributes
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
#!/bin/bash | |
UPDATES=`yum check-update -q | awk '{print $1}'` | |
COUNT=`printf "%s\n" "$UPDATES" | grep -v "^$" | wc -l` | |
YUM=`printf "%s\n" "$UPDATES" | grep -v "^$" | grep yum` | |
echo '--------------------------------------------------------------------------------' | |
echo " Weekly Update Notification for `hostname`" | |
echo " -> $COUNT update(s) available" | |
if [ -n "$YUM" ]; then | |
echo ' -> IMPORTANT: A Yum update is available. Perform this separately and first.' | |
fi |
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
#!/bin/bash | |
# This is a simple script that takes some files as arguments and sends them to a special chat | |
# Just create a new bot at @BotFather and get your chat ID from @myidbot and enter them here | |
# You can also make a shortcut in '~/.bashrc' like "alias tg='bash /opt/scripts/tg.sh'" | |
# After that restart bash and use it like 'tg file1.txt file2.jpg' | |
# EDIT TOKEN and CHAT_ID: | |
TOKEN="TOKEN" | |
CHAT_ID="12341234" | |
# Make sure curl is installed | |
for arg in "$@" |
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
<html lang="en" class="no-js"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | |
<style> | |
html body {width: 100%;height: 100%;padding: 0px;margin: 0px;overflow: hidden;font-family: arial;font-size: 10px;color: #6e6e6e;background-color: #000;} #preview-frame {width: 100%;background-color: #fff;}</style> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script> | |
//function to fix height of iframe! | |
var calcHeight = function() { |
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
# by: apolzek | |
md5sum * | sort -n > .file | |
filename='.file' | |
n=1 | |
x=1 | |
while read line; do | |
current_hash=$(echo $line | awk {'print $1'}) | |
echo "[debugging] current_hash: $current_hash" | |
x=$(($n + 1)) |
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
// ==UserScript== | |
// @name BlockBlockAdBlock | |
// @namespace http://github.com/anka-213 | |
// @version 0.1.1 | |
// @description Block the BlockAdBlock script | |
// @author Andreas Källberg | |
// @match http://blockadblock.com/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== |
git clone https://github.com/certbot/certbot /opt/letsencrypt
ln -s /opt/letsencrypt/certbot-auto /usr/bin/certbot
certbot certonly --expand --agree-tos --text --non-interactive \
--standalone \
Não é possível desfazer um push diretamente, como é feito com o commit utilizando o comando $ git reset --soft|mixed|hard hash-do-penultimo-commit
Para desfazer um push são necessários 3 passos:
- Utilizar o comando
$ git reset --mixed hash-do-penultimo-commit
e em seguida utilizar o comando$ git stash
- Utilizar o comando
$ git revert hash-do-ultimo-commit
- Utilizar o comando
$ git stash apply
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
<?php | |
$str_conn="firebird:host=localhost;dbname=/var/lib/firebird/2.5/data/employee.fdb;charset=UTF8"; | |
$dbh = new PDO($str_conn, "sysdba", "masterkey"); | |
?> |
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
curl --connect-timeout 15 -v --insecure "smtp://smtp.example.com:25" -u "username:password" | |
\ --mail-from "[email protected]" --mail-rcpt "[email protected]" | |
\ -T email-contents.txt --ssl |
NewerOlder