Skip to content

Instantly share code, notes, and snippets.

View kikislater's full-sized avatar
🏄‍♂️

Sylvain POULAIN kikislater

🏄‍♂️
View GitHub Profile
@kikislater
kikislater / SITL_Vagrant_Arduplane.sh
Created July 17, 2019 16:26
SITL Vagrant Arduplane
git clone https://github.com/ArduPilot/ardupilot.git
cd ardupilot
vagrant up
vagrant ssh
cd /vagrant
git submodule update --init --recursive
#Edit ~/ardupilot/Tools/autotest/location.txt to add new location
sim_vehicle.py -j2 -v ArduPlane --location new_location
@kikislater
kikislater / comment.sh
Last active January 22, 2020 06:47 — forked from haisum/script.sh
comment and uncomment lines in bash script via sed
sed -i '/<pattern>/s/^/#/g' file #comment
sed -i.bak '/argtypes/s/^/#/' file #comment and backup
sed -i '/<pattern>/s/^#//g' file #uncomment
@kikislater
kikislater / mprime-phc-setup.sh
Created March 9, 2020 07:35
Script to auto find undervolt CPU with PHC method : https://wiki.archlinux.org/index.php/PHC
#!/bin/bash
# Find lowest vids for PHC so that mprime doesn't find errors.
# Shouldn't crash the computer, but might.
#####################################
# Parameters.
# short_test_length should be between 15 and 60 s.
# Use a longer length to avoid crashing during the test.
# ------------------------------------------------------------------------------
# tlp - Parameters for power saving
# See full explanation: https://linrunner.de/en/tlp/docs/tlp-configuration.html
# Notes:
# - Some parameters are disabled, remove the leading '#' to enable # them;
# shown values are suggestions not defaults
# - Default *: intrinsic default that is effective when the parameter is missing
# or disabled by a leading '#'; use PARAM="" to disable intrinsic defaults for
# parameters with text string values
#
# ~/.bashrc
#
[[ $- != *i* ]] && return
colors() {
local fgc bgc vals seq0
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
@kikislater
kikislater / userContent.css
Created August 11, 2020 18:50
userContent.css
* {
-moz-animation: none !important;
animation: none !important;
}
@kikislater
kikislater / Git force pull to overwrite local files
Created September 26, 2020 05:35
Git clean and force pull to overwrite local files
# Git clean and force pull to overwrite local files
git reset --hard HEAD
git clean -f -d ## -n to get it interactive
git pull
@kikislater
kikislater / better_surfline.js
Created October 14, 2020 05:02 — forked from samtay/better_surfline.js
Reveal more forecast data
// ==UserScript==
// @name Free Surfline Forecasts
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Unblurr restricted forecast data. They are dumb enough to actually put the real data in the DOM.
// @author samtay
// @match http*://www.surfline.com/*
// @grant none
// ==/UserScript==
#!/bin/bash
##############################################
# Download du fichier IP de BlockList.de : #
##############################################
# Vérifie que l'on est en Root
if [[ $EUID -ne 0 ]];
then
echo "Ce script doit être exécuté avec les privilèges administrateur"
@kikislater
kikislater / Export_layout_from_pyqgis3_script.py
Created April 15, 2019 15:22
Export QGIS 3 layout from pyqgis 3 script
#!/usr/bin/env python3
import os
from qgis.core import (QgsProject, QgsLayoutExporter, QgsApplication)
QgsApplication.setPrefixPath("/usr", True)
gui_flag = False
app = QgsApplication([], gui_flag)
app.initQgis()