Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Author : Joost
# In debian instead of making own user root, to install use the root user:
# su
# make sure to edit /root/.bashrc and add the path (https://unix.stackexchange.com/questions/160019/dpkg-cannot-find-ldconfig-start-stop-daemon-in-the-path-variable/364199)
# export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# PROtip: add a file .trackerignore to your $HOME/git folder. That way Debian Search will not start indexing it. (maxing out a core!)
# From Software center:
http://psget.net/
@javdl
javdl / chocolatey-windows-development-env-setup.ps1
Last active August 1, 2018 14:09 — forked from amogram/chocolatey-env-setup.ps1
A Chocolatey script for PowerShell I use to set up my Windows development environment. I use this when setting up my own Dev VMs. Use at your own risk.See http://bit.ly/1a301JK and http://chocolatey.org/ for more information.
# Simple environment setup script with Chocolatey
# https://chocolatey.org/install
# Post install
# Setup Windows Subsystem for Linux (WSL) terminal in Windows 10 :
# https://stackoverflow.com/questions/44450218/how-do-i-use-bash-on-ubuntu-on-windows-wsl-for-my-vs-code-terminal#_=_
# https://stackoverflow.com/a/44450219/1251997
# GitHub Desktop (for ssh-key agent)
choco feature enable -n allowGlobalConfirmation
@javdl
javdl / GitLab Runner on local machine to Debug GitLab CI Builds Locally.md
Last active August 22, 2018 14:15
Create build pipelines or Debug gitlab ci problems on your local machine.

GitLab Runner on local machine to Debug GitLab CI Builds Locally

Create build pipelines or Debug gitlab ci problems on your local machine. Also, you can use this runner to run builds on your local machine instead of using shared runners. I would recommend doing that on a server though.

Then on your local machine run one of your build/test stages:

@javdl
javdl / .bashrc
Created April 13, 2018 07:00 — forked from copperlight/.bashrc
Window Subsystem for Linux ssh-agent Configuraton
# ... more above ...
# wsfl bash is not a login shell
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# ssh-agent configuration
if [ -z "$(pgrep ssh-agent)" ]; then
rm -rf /tmp/ssh-*
# Run it from the root of your Jekyll site like bash Jekyll-S3.sh
##
# Configuration options
##
STAGING_BUCKET='s3://<YOUR-S3-BUCKET-NAME>'
LIVE_BUCKET='s3://<YOUR-S3-BUCKET-NAME>'
SITE_DIR='_site/'
##
https://gitlab.com/gitlab-com/support-forum/issues/2674
https://cloud.google.com/container-registry/docs/advanced-authentication#json_key_file

Use Google Cloudshell with your favorite editor

Make sure your GCP project is set and you have the gcloud SDK installed. This is a quick guide based on a Google blogpost

Install sshfs

apt install sshfs

Test if you can connect with a regular SSH session (this allows SSH from any terminal, so you can use your favorite terminal with Cloudshell too!)

# Running this runs the above
wget -O - https://gist.githubusercontent.com/Joostvanderlaan/5eca1940e5c557b7d1ad5a2a33ab13af/raw/chromeos-crostini-developer-install.sh | bash