Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View renepardon's full-sized avatar

Christoph, René Pardon renepardon

View GitHub Profile
@MetalArend
MetalArend / swarm.yml
Last active April 16, 2024 13:54
Run a GitLab Runner on your Swarm
version: '3.4'
secrets:
# Find your registration token at: "Your project" > "Settings" > "CI/CD" > "Runners settings" > "Specific Runners" (look for registration token)
# Register it as `GITLAB_REGISTRATION_TOKEN`: `docker secret create GITLAB_REGISTRATION_TOKEN YOUR_REGISTRATION_TOKEN`
GITLAB_REGISTRATION_TOKEN:
external: true
# Find your personal access token at: "Your user account" > "Settings" > "Access Tokens" > "Create personal access token" (for api)
# Register it as `GITLAB_PERSONAL_ACCESS_TOKEN`: `docker secret create GITLAB_PERSONAL_ACCESS_TOKEN <YOUR ACCESS TOKEN>`
@seanhandley
seanhandley / docker-compose.yml
Last active April 9, 2024 04:05
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@punyaruchal
punyaruchal / Apache_Multiple_PHP_Versions_Setup:on_macOS_High_Sierra.md
Last active March 4, 2023 08:21
MacOS 10.13 High Sierra Apache Setup: Multiple PHP Versions

Warning: Due to Homebrew/php tap being deprecated at the end of March 2018, and the moving of all PHP formulas to Homebrew/core, the installation of PHP versions we currently use is going to change. Currently PHP 7.2 is available in the core, but we are waiting on previous versions to be made available and will update this guide as soon as we can. Thanks!

Part 1: macOS 10.13 High Sierra Web Development Environment

Note: This is an updated version of our prior OS X development series. The newly released macOS 10.13 High Sierra and the accompanying updates to Brew require significant changes compared to prior releases, necessitating a thorough revamp in the process. Since 10.12 we now use Homebrew's Apache, rather than the built-in version, but this new appraoch is more flexible and should continue to work on prior OS X versions.

Developing web applications on macOS is a real joy. There are plenty of options for setting up your develop

@mdcass
mdcass / BaseTransformer.php
Last active August 25, 2022 12:52
Transformer pattern in Laravel 5
<?php
namespace App\Transformers;
/**
* Class BaseTransformer
*/
class BaseTransformer
{
/**
* The model or models to be transformed
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@tjdaley
tjdaley / dot-notation-setter-getter.js
Created February 1, 2017 03:40
Get or Set an object's property value based on a dot-notation key
/*
* dot-notation-setter-getter.js
*
* Created by Thomas J. Daley, J.D. on Jan 31, 2017
*
*/
"use strict";
/**
@rvl
rvl / git-pushing-multiple.rst
Created February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@renshuki
renshuki / ubuntu_agnoster_install.md
Last active April 23, 2024 13:04
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@ralavay
ralavay / vim-nginx-conf-highlight.sh
Last active April 21, 2024 03:58
Enable syntax highlight for Nginx conf file in Vim
#!/bin/bash
#
# Highligh Nginx config file in Vim
# Download syntax highlight
mkdir -p ~/.vim/syntax/
wget http://www.vim.org/scripts/download_script.php?src_id=19394 -O ~/.vim/syntax/nginx.vim
# Set location of Nginx config file
cat > ~/.vim/filetype.vim <<EOF
@vvo
vvo / video-snapshots-sprites.sh
Created July 15, 2013 14:28
generate sprites of video snapshots
sudo aptitude install ffmpeg
sudo aptitude install imagemagick
# fps=1 > every seconds
ffmpeg -i video.mp4 -f image2 -vf fps=fps=1 out%d.png
# horizontal sprite, resized at 30%
convert -resize 30% +append out*.png sprite-1-sec.png
# references: