Skip to content

Instantly share code, notes, and snippets.

View coilysiren's full-sized avatar
🛠️
engineering software

Kai coilysiren

🛠️
engineering software
View GitHub Profile
@coilysiren
coilysiren / twitter_force_unfollow.py
Created October 8, 2015 10:01
A twitter script to force unfollow all the people that follow you, but you don't follow back. Best used with private accounts
# internal
import time
# external
import flask
from twython import Twython
# local
from env import ENV
# internal
import re
import subprocess
# external
import twython
# prosaic, obviously
twitter = twython.Twython(
ENV['API_KEY'],
@coilysiren
coilysiren / install.bash
Last active July 8, 2020 15:24
Installing Django CMS on Digital Ocean (March 7th 2016)
# from inside the top level project folder (ie. where .git/, Procfile, etc lives)
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev git python3.4 python3.4-dev -y
virtualenv -p python3.4 .venv && source .venv/bin/activate
pip install -e git+https://github.com/nephila/djangocms-installer#egg=djangocms-installer
pip install "django-cms<3.3" "django-treebeard>=2.0" "https://github.com/divio/djangocms-column/archive/master.zip?1457384272.4600909" "https://github.com/divio/djangocms-googlemap/archive/master.zip?1457384272.4600909" "https://github.com/divio/djangocms-inherit/archive/master.zip?1457384272.4600909" "https://github.com/divio/djangocms-link/archive/master.zip?1457384272.4600909" "https://github.com/divio/djangocms-style/archive/master.zip?1457384272.4600909" "easy_thumbnails" "django-filer>=0.9.12" "cmsplugin-filer>=0.10.2" "djangocms-admin-style>=1.0.6" "djangocms-text-ckeditor>=2.8.1" "Django<1.9" "pytz" "django-reversion>=1.8.7,<1.9" "django-classy-tags>=0.3.4.1" "html5lib"
@coilysiren
coilysiren / config.yaml
Last active August 6, 2016 14:41
Unfollows: (a) people who dont follow you back or (b) people you haven't talked to publically or (c) people who haven't posted in 3 months
---
# start working from % of your most recent follows
# ex: for 1000 follows, 5 = ignore the last 50 accounts you followed
offset: 5
# what you use at https://twitter.com/login
# DONT LET THIS GET POSTED PUBLICLY !!!!!!!!!!!!!!!!!!!!!!!!!!!!
username: "XXXXXXXXX"
password: "XXXXXXXXX"
@coilysiren
coilysiren / issues.md
Last active September 16, 2016 10:40
@coilysiren
coilysiren / worker.rb
Created September 7, 2016 08:51
sidekiq worker with arbitrary callback functions
# references:
# https://github.com/mperham/sidekiq (sidekiq)
# https://ruby-doc.org/core-2.3.1/Object.html#method-i-send (ruby's `send` method)
# https://robots.thoughtbot.com/ruby-2-keyword-arguments (ruby keywork arguments in general)
# https://github.com/mperham/sidekiq/issues/2372 (keyword arguments in sidekiq)
# https://github.com/mperham/sidekiq/wiki/Best-Practices (sidekiq best practices)
class Worker
include Sidekiq::Worker
def perform(callback=nil)

image

Title: Lynn Cyrin

Website: http://lynncyrin.me/#contracting

Name: Lynn Cyrin

Services & Products: Web Development (new sites, technical upgrades), Ruby / Python / PHP / Javascript / CSS

@coilysiren
coilysiren / middleware.py
Last active November 14, 2016 08:36
django 1.10 basic auth (for the entire website)
# builtin
import base64
# django
from django.http import HttpResponse
from django.conf import settings
def _unauthed():
response = HttpResponse('''
<html><title>Authorization required</title><body>

Code of Conduct

(...)

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery
+ The use of sexualized language or imagery at non-consenting parties, on the public timeline, or without the nsfw filter

So I have these feelings in a context where the criminal justice system is broken, society is oppressive, and shit is just generally Bad. It's within the context that Chelsea Manning got imprisoned for letting the public know about information that should have been the public's right to know. She got imprisoned for an undue amount of time given the "crime" committed, and then was subject to the psychological torture that's unfortunately business as usual for trans people in the criminal justice system.

Everything about Chelsea's experience has been extraordinarily unfair, and her emminent release is, at the very least, a step towards things in the world being slightly less broken.