Skip to content

Instantly share code, notes, and snippets.

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 Oct 4, 2022
GameCI Azure Pipeline
View azure-pipelines.yml
# 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 Sep 5, 2018
Generate a new ssh key and add it to remote server's authorized_keys
View how-to-add-ssh-key-to-remote-host.md

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 Oct 23, 2022
An attempt to create a class naming style for django
View django_naming_things.md

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 Aug 19, 2017
Verify Gitlab CI config (.gitlab-ci.yml) using command line
View README.md

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 May 19, 2020
Albert (https://github.com/albertlauncher/albert) external plugin to for copyq integration
View copyq
#!/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 Sep 6, 2022
.env file to json using simple python
View env-to-json.py
#!/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:
View unity-fastfile.rb
# 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
View unitySizeAnalyzer.sh
#!/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 Nov 4, 2016
Unity App Size Analyzer
View unitySizeAnalyzer.sh
#!/usr/bin/env bash
function dumpBundle {
FILE=$1
OUTDIR=$2
LZMADIR=$3
OUTPATH="$OUTDIR/$FILE"
LZMAPATH="$LZMADIR/$FILE"
mkdir -p $(dirname "$OUTPATH")