Skip to content

Instantly share code, notes, and snippets.

View damondouglas's full-sized avatar
💭
😼

Damon damondouglas

💭
😼
  • Google, Inc.
View GitHub Profile
@pims
pims / app.py
Last active June 9, 2024 22:58
Example of running a python script via python-wasi using the wasmtime wasm runtime
print("hello from a python script")
# Source: https://gist.github.com/0a322f969368bec74b75677da217291c
#################################################################################
# Manage Container (Docker) Images, Helm, CNAB, and Other Artifacts With Harbor #
# https://youtu.be/f931M4-my1k #
#################################################################################
# Additional Info:
# - Harbor: https://goharbor.io
# - Signing And Verifying Container Images With Sigstore Cosign And Kyverno: https://youtu.be/HLb1Q086u6M
@korakot
korakot / gophernotes.md
Last active April 27, 2023 06:12
Using Golang kernel in Colab
@maxivak
maxivak / readme.md
Last active July 5, 2024 13:54
Restore repo from Gitlab bundle file

Gitlab exports repositories to tar archive which contains .bundle files.

We have repo.bundle file and we want to restore files from it.

  • create bare repo from bundle file
git clone --mirror myrepo.bundle my.git
"""Usage:
build.py find <regexp> <path>
build.py -h | --help | --version
"""
from docopt import docopt
def find(arguments):
print(arguments)
if __name__ == '__main__':
@mattes
mattes / check.go
Last active October 11, 2024 16:22
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) {
// path/to/whatever exists
}
@stephanetimmermans
stephanetimmermans / ubuntu-compass-ruby
Last active May 16, 2024 03:29
Install Compass+Ruby on Ubuntu 14.04
#https://gorails.com/setup/ubuntu/14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default
@iamnewton
iamnewton / bash-colors.md
Last active November 5, 2024 23:43
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@damondouglas
damondouglas / builddartium.sh
Created February 1, 2014 03:36
Building Dartium Notes
#get cr
curl -O https://raw.github.com/jankeromnes/cr/master/cr
cp cr /usr/local/bin/cr
chmod a+rx /usr/local/bin/cr
#install gclient
cr gclient
# I think deleting what was inside this folder but not sure
# ~/.subversion/auth/svn.ssl.server
@amycheng
amycheng / shellcommands.sh
Last active January 1, 2016 11:19
Useful Shell commands because I always have to google them!
# copy folders from remote to local
# use '/' for absolute directories
scp -r /path/to/source /path/to/destination
scp -r source login@address:/destination
# delete folder and files within that folder
rm -rf -- <dir-to-remove>