Skip to content

Instantly share code, notes, and snippets.

View worldofchris's full-sized avatar
🏠
Working from home

Chris Young worldofchris

🏠
Working from home
View GitHub Profile
@Tknott95
Tknott95 / Durer.md
Last active October 10, 2020 07:35

such tools sit idle whilst in melancholic limbo - axiomatic ode to durer

@syntaqx
syntaqx / cloud-init.yaml
Last active March 26, 2024 21:02
cloud init / cloud config to install Docker on Ubuntu
#cloud-config
# Option 1 - Full installation using cURL
package_update: true
package_upgrade: true
groups:
- docker
system_info:
@Tknott95
Tknott95 / gcloud-quota.MD
Last active October 31, 2020 07:53
Google Cloud FIX for - IN_USE_ADDRESSES | 8 Used Quota | exceeded quotas 8+ needed 1

Google Cloud Deploy fix for 8 used quota limit issue 8+ 1 needed

(visually see servers in pic)

Gcloud Logo

** error message **

IN_USE_ADDRESSES | 8 Used Quota | exceeded quotas 8+ needed 1
@oseiskar
oseiskar / swagger-yaml-to-html.py
Last active April 30, 2024 10:57
Converts Swagger YAML to a static HTML document (needs: pip install PyYAML)
#!/usr/bin/python
#
# Copyright 2017 Otto Seiskari
# Licensed under the Apache License, Version 2.0.
# See http://www.apache.org/licenses/LICENSE-2.0 for the full text.
#
# This file is based on
# https://github.com/swagger-api/swagger-ui/blob/4f1772f6544699bc748299bd65f7ae2112777abc/dist/index.html
# (Copyright 2017 SmartBear Software, Licensed under Apache 2.0)
#
@goldsmith
goldsmith / numpy_os_x_10_9.sh
Last active January 6, 2024 07:25
How to install Numpy and Scipy on Mac OS X Mavericks (10.9) using Pip.
# set up flags for Numpy C extentions compiling
export CFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-m32 -m64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64"
export CC=gcc-4.2
export CXX="g++ -arch i386 -arch x86_64"
pip install numpy
# success!
@goldsmith
goldsmith / python_mavericks_guide.sh
Last active June 3, 2020 12:18
When I upgraded my Mac to OS X Mavericks, a lot of utilities (like Python, virtualenv, Xcode) broke, and it was pretty stressful trying to get it all set back up. Hopefully this guide can spare you some of that pain.Note: I'm by no means a Linux or Mac expert, so please fork and let me know if anything is redundant, incorrect, or missing!
# A guide to prevent pain and suffering while upgrading to OS X Mavericks
# This will vary greatly depending on system set up, so read the instructions carefully
# Back up Virtulenvs
####################
# Very important!
# For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv
# in order to prevent loss of dependencies during the upgrade.
@dankrause
dankrause / _hover_example.py
Last active March 8, 2024 18:31
Example code to use the (unofficial, unsupported, undocumented) hover.com DNS API.
import requests
class HoverException(Exception):
pass
class HoverAPI(object):
def __init__(self, username, password):
params = {"username": username, "password": password}
r = requests.post("https://www.hover.com/api/login", params=params)
@shreeshga
shreeshga / gist:1627145
Created January 17, 2012 15:45
md5sum through brew
brew install md5sha1sum
@mbostock
mbostock / .block
Last active February 20, 2016 05:53
Pie Multiples
license: gpl-3.0
@oem
oem / gist:758561
Created December 29, 2010 14:01
capybara date select step definition for cucumber
# capybara step definition for a quick and dirty date select
# For example:
# When I select "May 7, 2010" as the post "published_on" date
When /^I select "([^"]*)" as the (.+) "([^"]*)" date$/ do |date, model, selector|
date = Date.parse(date)
select(date.year.to_s, :from => "#{model}[#{selector}(1i)]")
select(date.strftime("%B"), :from => "#{model}[#{selector}(2i)]")
select(date.day.to_s, :from => "#{model}[#{selector}(3i)]")
end