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/sh | |
color() { | |
echo -n "%{F#222}" | |
} | |
nocolor() { | |
echo -n "%{F#000}" | |
} | |
host_is_up() { | |
if ping -c 1 $1 &> /dev/null | |
then |
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
PROMPT="%{$fg[green]%}%~ %{$fg[cyan]%}%% %{$reset_color%}" | |
RPROMPT="%{$fg[green]%}[%n%{$reset_color%}@%{$fg[cyan]%}%m]%{$reset_color%}" |
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
* { | |
background-color: rgba(200, 200, 200, 0.20); | |
text-color: #000; | |
} | |
#element selected { | |
background-color: #222; | |
text-color: #C8C8C8; | |
} | |
#listview { | |
spacing: 0; |
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 praw, subprocess, pathlib | |
SUBREDDIT = "wallpapers" | |
pp = "{}/.prevwall".format(str(pathlib.Path.home())) # this is where the previously used wallpaper links are stored | |
previousImages = [] # This is where the urls of previously used images will be stored | |
r = praw.Reddit(client_id="", | |
client_secret="", | |
user_agent="WallpaperGrabber by /u/ParanoidBox") | |
allowedFormats = ['jpg', 'png'] | |
urls = [post.url for post in r.subreddit(SUBREDDIT).hot(limit=5) if post.url.split(".")[-1] in allowedFormats and !(in previousImages)post.url] |
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 glob, praw, requests, subprocess | |
from pathlib import Path | |
SUBREDDIT = "wallpapers" | |
wallpaperPath = "{}/Wallpapers/".format(str(Path.home())) | |
files = [i.split("/")[-1] for i in glob.glob(wallpaperPath+"*")] | |
r = praw.Reddit(client_id="", | |
client_secret="", | |
user_agent="WallpaperGrabber by /u/ParanoidBox") | |
allowedFormats = ['jpg', 'png'] | |
urls = [post.url for post in r.subreddit(SUBREDDIT).hot() if post.url.split(".")[-1] in allowedFormats and not post.url.split("/")[-1] in files] |
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 socket, threading | |
class irc(object): | |
def __init__(self, nick): | |
super(irc, self).__init__() | |
self.s = socket.socket() | |
self.nick = nick | |
self.channel = '##tinyvoxel' | |
self.server = 'irc.freenode.net' | |
self.oauth = 'ThisIsAPassIPromise' | |
self.main() |
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
#Imports | |
import socket | |
import sys | |
import sched, time | |
import re | |
#Globals | |
server = "chat.freenode.net" #The irc server that you want the bot to connect to. | |
channel = "##kanal56" #The channel you want the bot to join on start | |
botnick = "vorabot" #The bot's IRC Nick |