Skip to content

Instantly share code, notes, and snippets.

View gazorby's full-sized avatar
🏠
Working from home

Matthieu MN gazorby

🏠
Working from home
View GitHub Profile
@gazorby
gazorby / script_template.sh
Last active February 22, 2020 23:35
Shell script boilerplate
#!/usr/bin/env bash
############################################################
# PRIVATE FUNCTIONS
############################################################
############################################################
# PRIVATE (better to use use shortcuts)
# Display logs
#
# Arguments :
#!/usr/bin/env bash
# This script assumes networking is up
############################################################
# CONFIGURATION START
############################################################
############
# MANDATORY
############
#!/usr/bin/env fish
sudo cp -av /usr/share/gnome-shell/gnome-shell-theme.gresource{,~}
set -l GTK_THEME (gsettings get org.gnome.desktop.interface gtk-theme | sed "s/'//g")
cd /usr/share/themes/$GTK_THEME/gnome-shell
sudo glib-compile-resources --target=/usr/share/gnome-shell/gnome-shell-theme.gresource gnome-shell-theme.gresource.xml
#!/usr/bin/env bash
set -e
# Arch Linux Install Script (alis) installs unattended, automated
# and customized Arch Linux system.
# Copyright (C) 2018 picodotdev
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# Arch Linux Install Script (alis) configuration file
#
# Some values are preceded by a ! character, this means that the value is ignored.
# Some keys accept a single value others accept multiple values as annotated in the comments.
# init
KEYS="fr"
LOG="true"
# Partition
# Arch Linux Install Script (alis) configuration file
#
# Some values are preceded by a ! character, this means that the value is ignored.
# Some keys accept a single value others accept multiple values as annotated in the comments.
# init
KEYS="fr"
LOG="true"
# Partition
#!/usr/bin/env bash
# https://aur.archlinux.org/packages/pulseaudio-bluetooth-a2dp-gdm-fix
sudo groupadd pulse-users
sudo chown -R root:pulse-users /usr/bin/pulseaudio
sudo usermod -a -G pulse-users $USER
/**
* Set headers according to current project mode
* In development, we send JWT token via Authorization header
* while they are stored in httponly cookie in production
*/
const authLink = setContext(async (_, { headers }) => {
// Use your async token function here:
const csrfToken = await getCsrfToken();
// Return the headers to the context so httpLink can read them
if (process.env.NODE_ENV === "development") {
@gazorby
gazorby / cloudSettings
Created September 30, 2020 19:17
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-09-30T19:17:23.211Z","extensionVersion":"v3.4.3"}
# Modified version of Google Python style guide to be compatible with black formatter
# This Pylint rcfile contains a best-effort configuration to uphold the
# best-practices and style described in the Google Python style guide:
# https://google.github.io/styleguide/pyguide.html
#
# Its canonical open-source location is:
# https://google.github.io/styleguide/pylintrc
[MASTER]