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
| import socket, time, re | |
| # Not supposed to look pretty, supposed to look short and ugly | |
| send_ = lambda client, channel, m: client.send(f"PRIVMSG {channel} :{m}\r\n".encode()) #sends a private message to the channel or user PM if you pass a nickname | |
| raw_send_ = lambda client, m: client.send(f"{m}\r\n".encode()) #Use this to implrement more methods: https://tools.ietf.org/html/rfc1459 | |
| #This is a work in progress... pass in a number like 3 or 4 and send some messages | |
| recv_ = lambda client, n: list(map(lambda g: [g.group(1), g.group(2)], filter(lambda m: m, map(lambda m: re.match(r'^.*PRIVMSG (.*) :(.*)\r$', m), filter(lambda m: "PRIVMSG" in m, [client.recv(1024).decode('utf-8') for i in range(n)]))))) | |
| # Why not create a class? Because it's not funny! | |
| def Bot(host, port=6667, name="botty", channel="#lobby"): |
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
| import socket, time, re, trio | |
| from IrcBot.bot import IrcBot, utils | |
| import logging | |
| import threading | |
| import urllib.request | |
| from random import randint, choice | |
| from cleverbot_free.cbapi import CleverBot | |
| url = "http://www.storage.dot.org.es/trivia/questions.txt" | |
| res = urllib.request.urlopen(url) |
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
| hello im testing wgetpaste now |
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
| rofi usage: | |
| rofi [-options ...] | |
| Command line only options: | |
| -no-config Do not load configuration, use default values. | |
| -v,-version Print the version number and exit. | |
| -dmenu Start in dmenu mode. | |
| -display [string] X server to contact. | |
| ${DISPLAY} | |
| -h,-help This help message. |
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
| configuration { | |
| theme: "~/.config/rofi/themes/dt-center.rasi"; | |
| modi: "window,run,drun,ssh,file-browser,windowcd,combi,calc"; | |
| terminal: "/usr/bin/alacritty"; | |
| ssh-client: "/usr/bin/mosh"; | |
| ssh-command: "{terminal} -t {host} --class ssh_client -e {ssh-client} mattf -- mosh {host} -- tmux a"; | |
| sorting-method: "fzf"; | |
| matching: "fuzzy"; | |
| sort: true; | |
| drun-use-desktop-cache: true; |
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
| configuration { | |
| theme: "~/.config/rofi/themes/dt-center.rasi"; | |
| modi: "window,run,drun,ssh,file-browser,windowcd,combi,calc"; | |
| terminal: "/usr/bin/alacritty"; | |
| ssh-client: "/usr/bin/mosh"; | |
| ssh-command: "{terminal} -t {host} --class ssh_client -e {ssh-client} mattf -- mosh {host} -- tmux a"; | |
| sorting-method: "fzf"; | |
| matching: "fuzzy"; | |
| sort: true; | |
| drun-use-desktop-cache: true; |
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
| configuration { | |
| theme: "~/.config/rofi/themes/dt-center.rasi"; | |
| modi: "window,run,drun,ssh,file-browser,windowcd,combi,calc"; | |
| terminal: "/usr/bin/alacritty"; | |
| ssh-client: "/usr/bin/mosh"; | |
| ssh-command: "{terminal} -t {host} --class ssh_client -e {ssh-client} mattf -- mosh {host} -- tmux a"; | |
| sorting-method: "fzf"; | |
| matching: "fuzzy"; | |
| sort: true; | |
| drun-use-desktop-cache: true; |
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
| $ -X | |
| bash: -X: invalid option | |
| Usage: bash [GNU long option] [option] ... | |
| bash [GNU long option] [option] script-file ... | |
| GNU long options: | |
| --debug | |
| --debugger | |
| --dump-po-strings | |
| --dump-strings | |
| --help |
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
| $ -X | |
| bash: -X: invalid option | |
| Usage: bash [GNU long option] [option] ... | |
| bash [GNU long option] [option] script-file ... | |
| GNU long options: | |
| --debug | |
| --debugger | |
| --dump-po-strings | |
| --dump-strings | |
| --help |
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 | |
| service=$(wgetpaste -S | awk 'NR > 3{print $1}' | sed 's/\*//g' | rofi -dmenu -p service) | |
| lang=$(wgetpaste -s "$service" -L | awk '{print $1}') | |
| wgetpaste -s "$service" -l "$lang" -x -X -C |
OlderNewer