Skip to content

Instantly share code, notes, and snippets.

View adrien-barret's full-sized avatar
:shipit:

Adrien Barret adrien-barret

:shipit:
  • https://artemislab.io/
  • Canada, Quebec, Sherbrooke
  • X @AtemisLab
View GitHub Profile

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@adrien-barret
adrien-barret / Rust_syntax.md
Last active October 28, 2020 18:01 — forked from brson/gist:9dec4195a88066fa42e6
A Rust Syntax Guide

% A Guide to Rust Syntax

A very brief guide to Rust syntax. It assumes you are already familiar with programming concepts.

Assert macro

The assert! macro ends the program if the condition passed to it is not true:

fn main() {
@adrien-barret
adrien-barret / install_wsl.bat
Created September 23, 2020 15:20 — forked from trzecieu/install_wsl.bat
WSL Scripts
@echo off
echo - This scripts automates process of installing Windows Subsystem for Linux (WSL)
REM Due some limitations, this script has to be can't be executed under PowerShell
Get-ChildItem >nul 2>&1
if %errorLevel% == 0 (
echo # Swich to CMD
cmd /c start "" %0
exit 0
)
@adrien-barret
adrien-barret / rancher-backup.sh
Created October 21, 2019 19:15 — forked from d0whc3r/rancher-backup.sh
Rancher 2 backup script
#!/bin/bash
RANCHER_SERVER_NAME=$(docker ps -a --format "{{.Image}} {{.Names}}" | grep -i "rancher/rancher" | cut -d' ' -f2)
TODAY_DATE=$(date +%Y%m%d)
RANCHER_COPY_NAME=rancher-data-${TODAY_DATE}
CREDENTIALS_PATH=~/secrets
BACKUP_PATH=~/backup
RANCHER_BACKUP_FILE=rancher-data-backup-${TODAY_DATE}.tar.gz
USE_GDRIVE=0
if [ "$1" = "--gdrive" ]; then
@adrien-barret
adrien-barret / osx_bootstrap.sh
Created September 27, 2019 18:07 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@adrien-barret
adrien-barret / setup_os_x.sh
Created August 2, 2017 21:13 — forked from obahareth/setup_os_x.sh
A script to setup OS X with the apps and formulas I use.
# Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
# Tap sources we need
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew tap caskroom/versions