Skip to content

Instantly share code, notes, and snippets.

View Minipada's full-sized avatar
📚
Cooking, coding or in nature

David Bensoussan Minipada

📚
Cooking, coding or in nature
View GitHub Profile
@rodw
rodw / backup-github.sh
Last active June 4, 2024 16:06
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
#-------------------------------------------------------------------------------
# NOTES:
#-------------------------------------------------------------------------------
# * Under the heading "CONFIG" below you'll find a number of configuration
# parameters that must be personalized for your GitHub account and org.
# Replace the `<CHANGE-ME>` strings with the value described in the comments
# (or overwrite those values at run-time by providing environment variables).
@alandipert
alandipert / interfaces
Created March 12, 2013 20:14
raspbian configuration for bridging eth0 and wlan0
# /etc/network/interfaces
# Configured for bridging wifi<->ethernet
# Tested with:
# - RPi Model B Rev. 1
# - 2013-02-09-wheezy-raspbian
# - Edimax 8192-series USB wireless adapter
# - /etc/modprobe.d/8192cu.conf contents:
# - options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
# - firmware: c2d133fb4efe9c9995da7fd7e1c45d74254f5c4b
@aras-p
aras-p / preprocessor_fun.h
Last active May 28, 2024 05:15
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,

Compiling an optimized ATLAS on Ubuntu 12.04

  1. Download the latest ATLAS source from http://sourceforge.net/projects/math-atlas/files/. I'm using version 3.10.1
  2. Download the latest Netlib LAPACK from http://www.netlib.org/lapack/. I'm using version 3.4.2
  3. Turn off frequency scalings on your chip so that you can get reliable timings. This is essential to get a good ATLAS build
  sudo apt-get install cpufreq-info cpuspeed cpufrequtils sysfsutils
  # set each core to the "performance" governor, so that the clock frequency doesn't go down when idle
  # I have 8 cores, which is why I need to do this 8 times
  sudo cpufreq-selector -c 0 -g performance
#!/bin/bash
PKG=jsk-pcl-ros
#PKG=jsk-recognition-utils
set -x
#set -e
mkdir -p /tmp/${PKG}-build
cd /tmp/${PKG}-build
rm -fr *.deb *.changes
if [ ! -e ros-indigo-${PKG}_0.3.6.orig.tar.gz ]; then
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@lashex
lashex / aws-iot-mosquitto
Created May 23, 2016 21:05
Example Mosquitto CLI pub/sub using AWS IoT MQTT endpoint
The Mosquitto Pub CLI
$> mosquitto_pub --cert thing-0.pem --key thing-0.prv --cafile aws-iot-rootCA.crt -h XXXXXXXXYYYYY.iot.us-west-2.amazonaws.com -p 8883 -t 'test/thing' -m "Hello from Mosquitto"
The Mosquitto Sub CLI
$ mosquitto_sub --cert thing-0.pem --key thing-0.prv --cafile aws-iot-rootCA.crt -h XXXXXXXXYYYYY.iot.us-west-2.amazonaws.com -p 8883 -t 'test/+'
@JPvRiel
JPvRiel / apt_pinning_priorities.md
Last active June 1, 2024 09:56
Apt package pinning and priorities
@awesomebytes
awesomebytes / debian_from_ros_pkg.md
Last active June 1, 2024 20:55
How to create a debian from a ROS package
@oifland
oifland / Jenkinsfile
Last active March 23, 2024 17:59
Loops in Jenkinsfiles
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
echo_all(abcs)
}
stage('Test 2: loop of sh commands') {