# 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
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()
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"]}%
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function dumpBundle { | |
FILE=$1 | |
OUTDIR=$2 | |
LZMADIR=$3 | |
OUTPATH="$OUTDIR/$FILE" | |
LZMAPATH="$LZMADIR/$FILE" | |
mkdir -p $(dirname "$OUTPATH") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function dumpBundle { | |
FILE=$1 | |
OUTDIR=$2 | |
LZMADIR=$3 | |
OUTPATH="$OUTDIR/$FILE" | |
LZMAPATH="$LZMADIR/$FILE" | |
mkdir -p $(dirname "$OUTPATH") |
NewerOlder