Skip to content

Instantly share code, notes, and snippets.

Avatar
🐧
Art, engineering & digital training

Yoan Mollard ymollard

🐧
Art, engineering & digital training
  • Bordeaux INP
  • Bordeaux, France
View GitHub Profile
@ymollard
ymollard / persistent_bionic.md
Last active Nov 22, 2020
Create and duplicate Ubuntu Bionic Live USB witth persistence
View persistent_bionic.md

Custom persistent Live

Create the Live stick

Install DUS/MKUSB :

sudo add-apt-repository ppa:mkusb/ppa
sudo apt update
sudo apt install mkusb mkusb-nox usb-pack-efi
dus
  1. OK for Zenity
@ymollard
ymollard / mount_img.md
Created Oct 31, 2020
Mount an img file with multiple partitions to edit files in them
View mount_img.md
sudo losetup 2020-10-23-poppy-torso.img -Pf
ll /dev/loop*

Then find the partition there eg /dev/loop15p2

mdkir -p mnt
@ymollard
ymollard / multipass.md
Last active Oct 30, 2020
Multipass VMs
View multipass.md

Build a custom image

multipass launch           # will create a 20.04
sudo apt update
sudo apt upgrade
sudo apt install ubuntu-desktop xrdp
sudo passwd ubuntu         # Change the password
View scratch_build.md

https://github.com/LLK/scratch-gui/wiki/Getting-Started#example-scratch-gui-vm-and-blocks-linked

mkdir scratch && cd scratch
git clone https://github.com/aubrune/scratch-gui # if making changes fork the project and check out your copy
git clone https://github.com/aubrune/scratch-vm # if making changes fork the project and check out your copy
git clone https://github.com/aubrune/scratch-blocks # if making changes fork the project and check out your copy
cd scratch-vm
npm install
sudo npm link
View poppy_bad_config.txt
oct. 15 19:14:23 poppy python[641]: Traceback (most recent call last):
oct. 15 19:14:23 poppy python[641]: File "bouteillederouge.py", line 70, in <module>
oct. 15 19:14:23 poppy python[641]: pidfile=pidfile)
oct. 15 19:14:23 poppy python[641]: File "/home/poppy/dev/puppet-master/puppet_master.py",
oct. 15 19:14:23 poppy python[641]: self.logfile = self.config.poppyLog.puppetMaster
oct. 15 19:14:23 poppy python[641]: File "/home/poppy/dev/puppet-master/puppet_master.py",
oct. 15 19:14:23 poppy python[641]: return Config.from_file(self.configfile)
oct. 15 19:14:23 poppy python[641]: File "/home/poppy/dev/puppet-master/config.py", line 22
oct. 15 19:14:23 poppy python[641]: return cls(yaml.load(f, Loader=yaml.SafeLoader), file
oct. 15 19:14:23 poppy python[641]: File "/home/poppy/pyenv/lib/python3.7/site-packages/yam
View build_ios.bash
git clone git clone https://github.com/arbalet-project/frontage-frontend.git -b ionic_5
cd frontage-frontend
npm i
ionic build
# Generate assets with cordova
ionic capacitor open ios # Close Xcode then
npm install -g cordova-res
cordova-res ios
wget https://gist.githubusercontent.com/dalezak/a6b1de39091f4ace220695d72717ac71/raw/3c858045b84dab9d39bd53cb2d19fba3e523bef4/resources.js
@ymollard
ymollard / config.json
Created Sep 26, 2020 — forked from EtienneSchmitz/config.json
Frontage/Bordeaux
View config.json
{
"apps": [
"Flags",
"RandomFlashing",
"SweepRand",
"SweepAsync",
"Tetris",
"Snake",
"Drawing"
],
View config_capsciences.json
{
"apps": [
"Flags",
"RandomFlashing",
"SweepRand",
"SweepAsync",
"Tetris",
"Snake",
"Drawing"
],
@ymollard
ymollard / clean_git_repository.bash
Created Feb 4, 2016
Clean a git repository by deleting history and data of old deleted files
View clean_git_repository.bash
#!/bin/bash
# This script, executed at the root of a git repository, deletes traces of every old file in this repository, index + blob on all branches
# It can take 10-30 minutes to run and will print regular warning stating than some references are unchanged
# time ./clear_git_repositor.bash >cleaning.log
# We need several passes to clean files renamed multiple times (git log --find-renames prevents its deletion for each renaming)
# MAXIMUM_PASSES should be more than the maximum number of renamings/movings for any file, if not then we might keep some traces of former files
MAXIMUM_PASSES=10 # Maximum number of passes
@ymollard
ymollard / to_pypi.bash
Created Aug 28, 2020
Create tags to trigger publishing to Pypi
View to_pypi.bash
git commit -am "Version bump"
git push origin master
git tag 4.0.3
git push 4.0.3
You can’t perform that action at this time.