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
sigmavirus24 / convert-themer.sh
Created July 7, 2019 15:15
Convert themer.dev SVGs to PNGs for use on Linux (with something like feh, for example)
#!/bin/sh
# 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
sigmavirus24 / install-polybar-ex.sh
Created March 24, 2018 13:55 — forked from nathanchere/install-polybar-ex.sh
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- https://gist.githubusercontent.com/nathanchere/22491daf4f917b100a35e5c284a5fec5/raw/install-polybar-ex.sh | 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):
self.name = name
self.klass = klass
self.bases = bases
self.children = children or []
@sigmavirus24
sigmavirus24 / filename.py
Created February 1, 2017 12:31
Gist Title
#content
@sigmavirus24
sigmavirus24 / .gertty.yaml
Created December 15, 2016 16:52
Solarized palette for gertty
palettes:
- 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)
do_something(parsed_args.arg_a)
return something
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='http://10.0.2.15:5000/v3', 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='127.0.0.1:8083/v1/')
craton.inventory(1).hosts.create(**{'name':'test', 'project_id':1,'ip_address':'1.1.1.1', 'region_id':1, 'device_type':'test'})
def block = {
echo(it)
}
def streams = [a: block.curry('a'), b: block.curry('b'), c: block.curry('c')]
parallel streams
//streams.each { item ->
// item.value(item.key)
//}
~/.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 test.py
a=1
~/.flake8 bin/flake8 test.py
test.py:1:1: E225 missing whitespace around operator

Keybase proof

I hereby claim:

  • I am sigmavirus24 on github.
  • I am sigmavirus24 (https://keybase.io/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: