Skip to content

Instantly share code, notes, and snippets.

View blvz's full-sized avatar

Rafael Belvederese blvz

View GitHub Profile
@cweilguny
cweilguny / docker-compose-gitlab.yml
Last active October 27, 2021 00:55
A docker-compose config in v3 format for nginx-proxy with separate containers for nginx, dockergen and letsencrypt-companion. Additional example on how to get GitLab docker container running with this nginx-proxy setup. You need to create the docker network before, just run 'docker network create nginx-proxy'. Docker will tell you so if you don'…
version: '3'
services:
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com'
nginx['listen_port'] = 80
@armand1m
armand1m / Dockerfile
Last active March 10, 2024 14:54
Yarn cache compatible Dockerfile
FROM alpine
RUN apk add --update --no-cache nodejs
RUN npm i -g yarn
ADD package.json yarn.lock /tmp/
ADD .yarn-cache.tgz /
RUN cd /tmp && yarn
RUN mkdir -p /service && cd /service && ln -s /tmp/node_modules
@MrTrustor
MrTrustor / clean-docker-for-mac.sh
Last active November 21, 2023 11:38
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
#!/bin/bash
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <(
@dead-claudia
dead-claudia / LICENSE.md
Last active December 11, 2015 11:58
Monadified error-first callbacks in LiveScript, inspired by JS's async-await proposal. Version in JS is for speed.

Copyright (c) 2015, Isiah Meadows

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

@gubatron
gubatron / multiple-deploy-keys-multiple-private-repos-github-ssh-config.md
Last active March 12, 2024 07:34
How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

Let's say alice is a github.com user, with 2 or more private repositories repoN. For this example we'll work with just two repositories named repo1 and repo2

https://github.com/alice/repo1

https://github.com/alice/repo2

You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.

@glslioadmin
glslioadmin / TEMPLATE.glsl
Last active July 5, 2019 00:55
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
void main() {
vec2 p = gl_FragCoord.xy / resolution.xy;
gl_FragColor = mix(texture2D(from, p), texture2D(to, p), progress);
@hushin
hushin / 0seek.jsfl
Created April 26, 2014 00:27
JSFL の global object 調べてみた@flash CS5.5
(function(global) {
var trace = fl.trace;
var clear = fl.outputPanel.clear;
clear();
var stock = [];
var is_stocked = function(target) {
return stock.indexOf(target) != -1;
};
var is_object = function(target) {
@yangshun
yangshun / youtube-vimeo-url-parser.js
Last active June 14, 2023 22:27
YouTube Vimeo URL Parser
function parseVideo (url) {
// - Supported YouTube URL formats:
// - http://www.youtube.com/watch?v=My2FRPA3Gf8
// - http://youtu.be/My2FRPA3Gf8
// - https://youtube.googleapis.com/v/My2FRPA3Gf8
// - Supported Vimeo URL formats:
// - http://vimeo.com/25451551
// - http://player.vimeo.com/video/25451551
// - Also supports relative URLs:
// - //player.vimeo.com/video/25451551
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)