Skip to content

Instantly share code, notes, and snippets.

View GabLeRoux's full-sized avatar
:shipit:
Shipping code for humans ✌

Gabriel Le Breton GabLeRoux

:shipit:
Shipping code for humans ✌
View GitHub Profile
@jerricko
jerricko / azure-pipelines.yml
Last active October 4, 2022 17:24
GameCI Azure Pipeline
# IMPORTANT NOTES
# This workflow was ported over from the gitlab example: https://gitlab.com/game-ci/unity3d-gitlab-ci-example/
# There may be better ways to do this, but this is what I came up with in a short timespan
# Azure creates its own user to inject into docker containers which causes weird problems with containers that don't have
# sudo installed. As you'll see in the game-ci containers, we install sudo before our scripts because otherwise, they run
# into all kinds of permission errors. Related issue: https://github.com/microsoft/azure-pipelines-agent/issues/2043
# Unity License string needs to be stored as a base64 string in order to work.
# See https://game.ci/docs/troubleshooting/common-issues#the-digital-signature-is-invalid
trigger:
- develop
@GabLeRoux
GabLeRoux / how-to-add-ssh-key-to-remote-host.md
Last active September 5, 2018 18:49
Generate a new ssh key and add it to remote server's authorized_keys

1. Generate yourself a new ssh key

# Generate new ssh key (from github)
# https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
ssh-keygen -t rsa -b 4096 -C "email@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/EXAMPLE_rsa
@jrobichaud
jrobichaud / django_naming_things.md
Last active March 7, 2024 00:32
An attempt to create a class naming style for django

Premise

Django code style is well documented however the documentation has no statement on how to name classes. When digging the documentation we can find various examples that does not follow an obvious standard.

Abstract base class documentation

from django.db import models

class CommonInfo(models.Model):
    name = models.CharField(max_length=100)
 age = models.PositiveIntegerField()
@Betree
Betree / README.md
Created August 19, 2017 05:30
Verify Gitlab CI config (.gitlab-ci.yml) using command line

Test your CI config upon Gitlab.com API

You need to install js-yaml-cli first :

npm install -g js-yaml-cli

Example :

> ./check_gitlab_ci.sh
{"status":"invalid","errors":["variables config should be a hash of key value pairs"]}%  
@BarbUk
BarbUk / copyq
Last active December 14, 2023 19:52
Albert (https://github.com/albertlauncher/albert) external plugin to for copyq integration
#!/bin/bash
copyq_get_row(){
local copyq_row="$(copyq read $1 | head -1 | sed -e 's/^[[:space:]]*//')"
# clean from non compatible json char
printf -v clean_copyq_row "%q" "$copyq_row"
echo -n "$clean_copyq_row"
}
@GabLeRoux
GabLeRoux / env-to-json.py
Last active September 10, 2023 00:45
.env file to json using simple python
#!/usr/bin/env python
import json
import sys
try:
dotenv = sys.argv[1]
except IndexError as e:
dotenv = '.env'
with open(dotenv, 'r') as f:
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
@GabLeRoux
GabLeRoux / unitySizeAnalyzer.sh
Created November 5, 2016 00:22 — forked from elaberge/unitySizeAnalyzer.sh
Unity App Size Analyzer
#!/usr/bin/env bash
function dumpBundle {
FILE=$1
OUTDIR=$2
LZMADIR=$3
OUTPATH="$OUTDIR/$FILE"
LZMAPATH="$LZMADIR/$FILE"
mkdir -p $(dirname "$OUTPATH")
@elaberge
elaberge / unitySizeAnalyzer.sh
Created November 4, 2016 22:56
Unity App Size Analyzer
#!/usr/bin/env bash
function dumpBundle {
FILE=$1
OUTDIR=$2
LZMADIR=$3
OUTPATH="$OUTDIR/$FILE"
LZMAPATH="$LZMADIR/$FILE"
mkdir -p $(dirname "$OUTPATH")