Skip to content

Instantly share code, notes, and snippets.

@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 / 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
http://psget.net/
#!/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:
@javdl
javdl / grid.js
Created January 22, 2018 08:57 — forked from wschenk/grid.js
create-react-app grid.js rmwc example
import React, {Component} from 'react'
import {
GridList,
GridTile,
GridTilePrimary,
GridTilePrimaryContent,
GridTileSecondary,
GridTileTitle } from 'rmwc'
class Grid extends Component {

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

Purging All Unused or Dangling Images, Containers, Volumes, and Networks

Docker provides a single command that will clean up any resources — images, containers, volumes, and networks — that are dangling (not associated with a container):

docker system prune

To additionally remove any stopped containers and all unused images (not just dangling images), add the -a flag to the command:

@javdl
javdl / Origin to Upstream
Last active December 6, 2017 20:56 — forked from javigomez/Origin to Upstream
Git command to rename the origin to upstream when you just forked a project
git remote rename origin upstream
git remote add origin git@github.com:user/fork.git
git push origin master
@javdl
javdl / Zsh & theme
Created June 23, 2016 07:39 — forked from leemour/Zsh & theme
Zsh installation and Agnoster theme settings
# Railscast
http://railscasts.com/episodes/308-oh-my-zsh
# Install Zsh
sudo apt-get update && sudo apt-get install zsh
# Install Oh-my-zsh
wget –no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O – | sh
# Make ZSH default shell
@javdl
javdl / README.md
Created October 2, 2015 09:23 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/