Skip to content

Instantly share code, notes, and snippets.

View zoidyzoidzoid's full-sized avatar
🌈
Be the change you wanna see in the world!

B zoidyzoidzoid

🌈
Be the change you wanna see in the world!
View GitHub Profile
@zoidyzoidzoid
zoidyzoidzoid / update-requirements.bash
Created April 13, 2016 08:56
Script for updating requirements.txt using Kenneth Reitz's new better pip workflow: http://www.kennethreitz.org/essays/a-better-pip-workflow
#!/bin/bash
set -efxu
cd "$(dirname "$0")/.."
if [ ! -f requirements-to-freeze.txt ]; then
echo "No requirements to freeze file found!"
exit 1
fi
@zoidyzoidzoid
zoidyzoidzoid / Notes.md
Last active April 25, 2016 15:03
Example reusable Google Cloud Platform gcloud configuration

gcloud config configurations was added to gcloud CLI in version 0.9.79 (2015/09/23)

(You probably don't need the [app] section)

@zoidyzoidzoid
zoidyzoidzoid / lfs-enable
Last active July 5, 2016 06:51
Notes on Git
#!/bin/bash
#
# Remove all files with a certain extension and add them to git-lfs
#
# Install git-lfs on OSX with `brew install git-lfs`
set -eu
set -o pipefail
EXT=$1
#!/usr/bin/env bash
#
# Print out commands for uninstalling old Python 2.7, PyPy, 3.x versions,
# and installing the latest versions.
#
# Currently does 2.7, PyPy, 3.3, 3.4, 3.5, and 3.6.
# pyenv uninstall -f 2.7.13
# pyenv uninstall -f 3.3.6
# pyenv uninstall -f 3.4.6
# pyenv uninstall -f 3.5.3
@zoidyzoidzoid
zoidyzoidzoid / open-space-build-servers.md
Last active November 9, 2016 06:52
Cape Town DevOps Days Open Space Notes #DevOpsDaysCPT

Build Servers

Jenkins

  • Jenkins Job Builder
  • Pipeline Plugin
  • Autoscaling agents/executors

Hosted CI

  • Travis CI
  • CircleCI

Question

Guys, I’m far from a regex expert. Where should I start if I want to convert my file with text like This is a text to <span id="f001">This</span><span id="f002"> is</span><span id="f003"> a</span><span id="f004"> text</span>

Solution

@zoidyzoidzoid
zoidyzoidzoid / kubernetes-service.yml
Created April 6, 2017 14:26
kubectl get svc/kubernetes -o yaml --export
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
component: apiserver
provider: kubernetes
name: kubernetes
selfLink: /api/v1/namespaces//services/kubernetes
spec:
#!/usr/bin/env bash
#
# Bash script for checking what installed packages in a virtualenv needs updates
#
# Requires:
# - OSX
# - core-utils installed (brew install core-utils)
# - pypi-cli installed (pip install pypi-cli)
#
# Example output:
This file has been truncated, but you can view the full file.
{
"id": "de_mirage_6879394198654196251488945051309360780",
"name": "astralis-vs-natusvincere-map1-mirage.dem",
"date": "2017-03-08T03:50:51-08:00",
"source": "ebot",
"comment": "",
"status": "None",
"client_name": "GOTV Demo",
"hostname": "eBot :: Astralis vs Natus Vincere",
"type": "GOTV",
2017/09/11 10:38:06 Loading g2-vs-north-map1-inferno.dem
2017/09/11 10:38:06 Parsing demo header
2017/09/11 10:38:06 Parsing to end
RoundAnnounceMatchStartedEvent was fired
2017/09/11 10:38:16 Took 9.925972917s
2017/09/11 10:38:16 Writing g2-vs-north-map1-inferno.dem.json
2017/09/11 10:37:52 Loading g2-vs-north-map2-cbble.dem
2017/09/11 10:37:52 Parsing demo header
2017/09/11 10:37:52 Parsing to end