Skip to content

Instantly share code, notes, and snippets.

View sigmavirus24's full-sized avatar
Taking a break from F/OSS indefinitely

Ian Stapleton Cordasco sigmavirus24

Taking a break from F/OSS indefinitely
View GitHub Profile
sigmavirus24 /
Created July 7, 2019 15:15
Convert SVGs to PNGs for use on Linux (with something like feh, for example)
# Copyright 2019 Ian Stapleton Cordasco
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
sigmavirus24 /
Created March 24, 2018 13:55 — forked from nathanchere/
Build Polybar on Fedora-ish systems
#!/usr/bin/env bash
# Builds Polybar on Fedora-based systems
# Tested on Fedora 25, Fedora 26 and Korora 25, untested on others
# To get started:
# wget -O- | bash
sudo dnf install -y cmake @development-tools gcc-c++ i3-ipc jsoncpp-devel alsa-lib-devel wireless-tools-devel libmpdclient-devel libcurl-devel cairo-devel xcb-proto xcb-util-devel xcb-util-wm-devel xcb-util-image-devel
# Python 3.3 only
class klass(object):
def __init__(self, name, klass, bases, children=None): = name
self.klass = klass
self.bases = bases
self.children = children or []
sigmavirus24 / .gertty.yaml
Created December 15, 2016 16:52
Solarized palette for gertty
View .gertty.yaml
- name: solarized
comment: ['dark blue', '']
comment-name: ['white,bold', '']
context-button: ['white,bold', '']
filename: ['light gray', '']
focused-filename: ['light magenta', '']
focused: ['black', 'light gray']
focused-added-line: ['light gray', 'dark green']
focused-added-word: ['white', 'dark gray']
import argparse
B_DEFAULT = 'default_b'
def function_a(**kwargs):
arg_a = kwargs.pop('arg_a')
arg_b = kwargs.pop('arg_b', B_DEFAULT)
return something
View (File for cratonclient to authenticate)
from keystoneclient import session as ksc_session
from keystoneclient.auth.identity import v3
from keystoneclient.v3 import client as keystone_v3
from cratonclient.v1.client import Client
from cratonclient import session as c_session
import pdb
auth = v3.Password(auth_url='', username = 'admin', password = 'secret', project_name = 'admin', user_domain_id = 'default', project_domain_id = 'default')
session = ksc_session.Session(auth=auth)
craton = Client(session=c_session.Session(session), url='')
craton.inventory(1).hosts.create(**{'name':'test', 'project_id':1,'ip_address':'', 'region_id':1, 'device_type':'test'})
View pipeline_script.groovy
def block = {
def streams = [a: block.curry('a'), b: block.curry('b'), c: block.curry('c')]
parallel streams
//streams.each { item ->
// item.value(item.key)
View gist:3d91e17ed81611fe2a84c7d32c33ba6c
~/.flake8 bin/flake8 --version
3.0.1 (pyflakes: 1.2.3, pycodestyle: 2.0.0, mccabe: 0.5.0) CPython 2.7.11 on Darwin
~/.flake8 cat
~/.flake8 bin/flake8 E225 missing whitespace around operator

Keybase proof

I hereby claim:

  • I am sigmavirus24 on github.
  • I am sigmavirus24 ( on keybase.
  • I have a public key whose fingerprint is 0161 BB7E B208 B5E0 4FDC 9F81 D9DA 0A04 9113 F853

To claim this, I am signing this object: