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 / 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
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)
//}

A Thankyou To Google

Dear Google,

I'd just like to thank you for disabusing me of the idea that JSON is under some requirement of well-formedness. I'd been labouring under the tyrannical misapprehension that some standards body had written down how JSON was supposed to work and that if I wanted to claim I was using JSON I would have to comply with that specification.

However, I today received a bug report indicating that a project to which I contribute was unable to make HTTP requests your Google Flights website could understand. I found this perplexing, but my eyes were opened when I saw your HTTP request. In particular, I enjoyed your freeform and inclusive definition of JSON. Allow me to show you what you've called JSON by showing you my SPDY request:

:host:www.google.fr
use std::rc::Rc;
fn main() {
let x = Rc::new(5i);
for _ in range(0, 10u) {
println!("{}", x)
}
}
authors:
hanzou:
name: Hanzou Hattori
display_name: Hanzou
gravatar: c66919cb194f96c696c1da0c47354a6a
email: hanzou@company.com
web: http://company.com
twitter: company
github: hhattori
jorgen:
include README.rst LICENSE.txt
recursive-include redis_metrics *.html
@sigmavirus24
sigmavirus24 / pr.md
Created September 13, 2012 14:52 — forked from kennethreitz/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@sigmavirus24
sigmavirus24 / gist:3623733
Created September 4, 2012 17:20
Testing github3.py edit
bar