Skip to content

Instantly share code, notes, and snippets.

View bsquidwrd's full-sized avatar
💭
Learning new things everyday

Squid bsquidwrd

💭
Learning new things everyday
View GitHub Profile
#!/bin/bash
while :
do
clear
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $*
sleep 1
done
#!/usr/bin/env python3.4
# Project: reddit_notifier
# File Name: reddit_notifier
# Created by: bsquidwrd
# Created on: 9/6/2015
import json
import sys
import time

Keybase proof

I hereby claim:

  • I am bsquidwrd on github.
  • I am bsquidwrd (https://keybase.io/bsquidwrd) on keybase.
  • I have a public key ASB1S6BX-Ak2z1fG5VqokwMWfNVUq5AvXUNu9gSnRbTkjgo

To claim this, I am signing this object:

@bsquidwrd
bsquidwrd / fetch_emails.py
Created March 16, 2017 17:05
Fetch emails with IMAP
import email
import imaplib
import os
class FetchEmail():
connection = None
error = None
@bsquidwrd
bsquidwrd / my_standard.sql
Last active March 22, 2017 17:07
SQL Standard vs My standard
SELECT
S.[ID]
,S.[FN]
,S.[LN]
FROM
STF S
WHERE
S.[DEL] = 0
AND S.[ID] >= 100
@bsquidwrd
bsquidwrd / fetch_emails.py
Created April 10, 2017 15:42
Fetch Emails with Python
import email
import imaplib
import os
SERVER = 'imap.gmail.com'
USERNAME = 'EMAIL ADDRESS'
PASSWORD = 'PASSWORD'
class FetchEmail():
@bsquidwrd
bsquidwrd / _Instructions.md
Last active October 20, 2022 11:36
PhantomBot !song command setup

In order to get Spotify now playing you must first enable Last.fm scrobbling inside your Spotify settings and sync it with your last.fm account.

Make sure to fill in the user and api key which you can get from here.

You must place the file inside your /var/www/html directory and name it something such as currentsong.php or song.php

Then, from Twitch chat, you can add a command like this:

!addcom !currentsong Current Song: (customapi thentypeyourwebsiteIPordomainnamehere)
http://steamcommunity.com/sharedfiles/filedetails/?id=873746971
http://steamcommunity.com/sharedfiles/filedetails/?id=902548451
http://steamcommunity.com/sharedfiles/filedetails/?id=915374863
http://steamcommunity.com/sharedfiles/filedetails/?id=784166441
http://steamcommunity.com/sharedfiles/filedetails/?id=771279262
http://steamcommunity.com/sharedfiles/filedetails/?id=775049557
http://steamcommunity.com/sharedfiles/filedetails/?id=873749349
http://steamcommunity.com/sharedfiles/filedetails/?id=747539326
http://steamcommunity.com/sharedfiles/filedetails/?id=711047840
http://steamcommunity.com/sharedfiles/filedetails/?id=557147187
@bsquidwrd
bsquidwrd / process_tasks.service
Created September 27, 2017 19:48
My process_tasks systemd service to have it run in the background
[Unit]
Description=Process Background Tasks
After=multi-user.target
[Service]
Type=idle
ExecStart=/path/to/env/bin/python /path/to/project/manage.py process_tasks
Restart=always
RestartSec=5
@bsquidwrd
bsquidwrd / first_follower.py
Last active November 24, 2017 23:30
Get the first follower of a channel
import requests
from dateutil.parser import parse
channel = "lassiz"
client_id = "INSERT TWITCH CLIENT ID HERE"
number_of_followers_to_print = 100
url = "https://api.twitch.tv/kraken/channels/{}/follows".format(channel)
payload = {