Skip to content

Instantly share code, notes, and snippets.

View codersquid's full-sized avatar

Sheila Miguez codersquid

View GitHub Profile
#!/usr/bin/env python2
# Find and restart lost Juju agents in a Juju2 environment.
import subprocess
import json
juju_output = subprocess.check_output(["juju","status","--format=json"])
the_dict = json.loads(juju_output)
to_fix = {}
@jiffyclub
jiffyclub / scipy_gender_stats.md
Last active July 29, 2016 17:59
SciPy Gender Diversity Stats
#!/bin/bash
set -eu
_UID=$(id -u)
GID=$(id -g)
# give lxd permission to map your user/group id through
grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root
# set up a separate key to make sure we can log in automatically via ssh
# with $HOME mounted
@hodgestar
hodgestar / pyconza2014-pyv.json
Last active August 29, 2015 14:27
PyConZA 2014 videos for Pyvideo.org
[
{
"category": "pyconza2014",
"state": 2,
"description": "PyConZA 2014 closing remarks.",
"language": "English",
"title": "PyConZA 2014: Closing Remarks",
"tags": [
"pyconza",
"pyconza2014",
@atcuno
atcuno / gist:3425484ac5cce5298932
Last active March 25, 2024 13:55
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 24, 2024 12:19
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

Guidelines for contribution

This document described guidelines for contributions for projects led by members of the [Poisot lab of computational ecology][pl], Université de Montréal. It should be followed by lab members (at all times), as well as people with suggested added features, or willing to contribute enhancement or bug fixes.

Authorship

Any contribution to the code of a software grants authorship on the next paper

@Roadmaster
Roadmaster / develop-in-lxc.py
Created February 2, 2015 21:14
develop-in-lxc.py
#!/usr/bin/env python3
#
# Copyright 2015 Canonical Ltd.
#
# Authors:
# Daniel Manrique <daniel.manrique@canonical.com>
#
# develop-in-lxc is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3, as
# published by the Free Software Foundation.
@jezhumble
jezhumble / coc.md
Last active November 9, 2019 05:19
Some notes on codes of conduct from a conference organizer's perspective

Some notes on codes of conduct from a conference organizer's perspective

  1. The customers of a Code of Conduct are the people whom it is protecting. For tech conferences, that means marginalized people.
  2. The Code of Conduct is a promise to its customers from the conference organizers that they will be in a safe space, and that they will be protected and given the benefit of the doubt in the event of something bad happening.
  3. Thus the wording of a code of conduct should be decided by its customers. The Geek Feminism wiki hosts an example code of conduct: http://geekfeminism.wikia.com/wiki/Anti-harassment_policy_resources
  4. The legal basis of a code of conduct is my right, as an event organizer, to kick anybody out of my private event for any reason, even if they have paid. This happens all the time, often with the most flimsy excuses: http://www.hannahettinger.com/guest-post-by-clare/

If you, as a non-customer of the CoC, are not

@michd
michd / .bash_profile
Last active August 29, 2015 14:01
My bash prefix (PS1)
# Return current git branch prefixed with |, nothing if not in git repo
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\|\1/'
}
# Returns some "dirty" flags if they apply, nothing if not in git repo,
# or current branch is clean.
# Flags: M = modified files, ? = untracked files, % = unresolved merges
# These flags are prefixed with a |
parse_git_dirty() {