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 | |
PWD=$(pwd) | |
CURDIR=$(dirname "$(readlink -f "$0")") | |
GROUP=$(ls -ld ~ | awk '{print $4}') | |
USER=$(ls -ld ~ | awk '{print $3}') | |
IP=$(ifconfig | grep -Pi 'inet\saddr:.+bcast' | awk '{print $2}' | sed 's/addr://g') | |
clear | |
cd ~ | |
echo "Precisamos de permissão de root para alguns comandos." | |
read -p 'Digite sua senha de usuário: ' PASSWORD |
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
import os, sys | |
if len(sys.argv) == 1: | |
print('Please, specify a directory!') | |
else: | |
root = sys.argv[1] | |
dirs = [x[0] for x in os.walk(root)] | |
for _ in dirs: | |
if _ != '.' and _ != root and '/.git' not in _: | |
filepath = _ + '/index.html' |
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 | |
clear | |
cd ~ | |
read -s -p 'Sudo password: ' PASSWORD | |
echo "" | |
echo $PASSWORD | sudo -Sk apt-get update | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get -y install oracle-java8-installer |
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
from multiprocessing import Process, Queue | |
import zipfile | |
import datetime | |
import shutil | |
import argparse | |
import os | |
class Crackr: | |
buffer_size = 1024000 |
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/python | |
from AppKit import NSWorkspace | |
import time | |
t = range(1,100) | |
for i in t: | |
time.sleep(3) | |
activeAppName = NSWorkspace.sharedWorkspace().activeApplication()['NSApplicationName'] | |
print(activeAppName) |
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/local/bin/awk -f | |
BEGIN { | |
printf "host\tloss\trtt min\tavg\tmax\tstddev\n" | |
} | |
/^---/ { | |
split($2, a, ".") | |
printf "%s\t", a[2] | |
} |
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 | |
cd ~ | |
read -s -p 'Sudo password: ' PASSWORD | |
echo "" | |
echo "Configuring server..." | |
read -p "What's the hostname of this machine? " NEW_HOSTNAME | |
echo $PASSWORD | sudo -Sk hostnamectl set-hostname $NEW_HOSTNAME | |
sudo sed -i -e "s/^127.0.0.1.*$/127.0.0.1 localhost $NEW_HOSTNAME/g" /etc/hosts | |
sudo dpkg-reconfigure tzdata | |
sudo service cron restart |
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 | |
clear | |
cd ~ | |
read -s -p 'Sudo password: ' PASSWORD | |
echo "" | |
echo $PASSWORD | sudo -Sk sudo apt-get update | |
echo "Installing mysql..." | |
sudo apt-get install -y mysql-server-5.7 | |
echo "Securing mysql instalation..." | |
sudo mysql_secure_installation |
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
from table1 in _repository1 | |
join table2 in _repository2 on table1.column equals table2.column into tmp | |
where table1.column == null | |
select new { Object1 = table1, Object2 = tmp.DefaultIfEmpty( ).FirstOrDefault( ) } |
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
public string RemoteIp => _httpContextAccessor.HttpContext.Connection.RemoteIpAddress.ToString(); |
OlderNewer