- Install ROS: http://wiki.ros.org/Installation/Ubuntu
- Create Catkin workspace: http://wiki.ros.org/catkin/Tutorials/create_a_workspace
- Change directory to workspace root and run setup script:
source devel/setup.bash
(testprintenv | grep ROS
; expect ROS env vars to be set) - Create a package: http://wiki.ros.org/ROS/Tutorials/CreatingPackage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get SSL cert from Let's Encrypt. | |
# See https://www.digitalocean.com/community/tutorials/how-to-create-let-s-encrypt-wildcard-certificates-with-certbot. | |
certbot certonly \ | |
--server https://acme-v02.api.letsencrypt.org/directory \ | |
--dns-digitalocean \ | |
--dns-digitalocean-credentials /path/to/certbot-creds.ini \ | |
--dns-digitalocean-propagation-seconds 300 \ | |
-d \*.example.com \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nicholas@Inspiron-3542:~/dev/SANDBOX/knex$ npm ls -prod | |
[email protected] /home/nicholas/dev/SANDBOX/knex | |
├── [email protected] | |
├── [email protected] | |
├─┬ [email protected] | |
│ └── [email protected] | |
├── [email protected] | |
├── [email protected] | |
├── [email protected] | |
├── [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function up(knex) { | |
return knex.schema.table('random', (table) => { | |
table.boolean('is_deleted') | |
.defaultsTo(0) | |
.notNullable(); | |
}); | |
} | |
function down(knex) { | |
const tableName = 'random'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Refresh repos | |
sudo apt update | |
# Update system | |
sudo apt upgrade | |
# Install Python 2 | |
sudo apt install python2.7 python-pip | |
# Install Python 3 | |
sudo apt install software-properties-common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source ROS env | |
source /opt/ros/melodic/setup.bash | |
# Create package (in path/to/workspace/src) | |
# NB: std_msgs and rospy are dependencies | |
# catkin_create_pkg my_package std_msgs rospy | |
# Create scripts directory in package root | |
# mkdir scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype.customMap = function(fn) { | |
if (typeof fn !== 'function') throw Error('Am I a joke to you?'); | |
const arr = this; | |
const arrLen = arr.length; | |
const getNewArr = (index, newArr) => { | |
if (index < arrLen) { | |
const newItem = fn(arr[index], index, arr); | |
return getNewArr(index + 1, [...newArr, newItem]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Download latest release and unzip | |
# https://github.com/carla-simulator/carla/releases/latest | |
# 2. Start CARLA server | |
./CarlaUE4.sh -opengl -fps=30 -quality-level=Low -windowed -ResX=1000 -ResY=600 | |
# To use different map, | |
# Change directory to PythonAPI/util | |
# Then run: | |
# python config.py -m Town05 | |
# Change weather: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup | |
# 1. Install Docker for your OS | |
# 2. Pull Docker image for Elasticsearch: docker pull docker.elastic.co/elasticsearch/elasticsearch:7.3.0 | |
# 3. Pull Docker image for Kibana: docker pull docker.elastic.co/kibana/kibana:7.3.0 | |
# 4. Run this script: chmod +x elk.sh && ./elk.sh | |
# Test | |
# Elasticsearch: curl http://127.0.0.1:9200/_cat/health | |
# Kibana: visit http://localhost:5601 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Enable SSH on your Raspberry Pi (https://www.raspberrypi.org/documentation/remote-access/ssh/). | |
# 2. Plug Pi to PC using an ethernet cable and enable the ethernet device in your settings. | |
# 3. Use the ifconfig command to get the ethernet device name and IP address e.g enx00e04c534458 and fe80::666c:c924:194c:1756 respectively. | |
# 4. SSH into Pi with default user (pi) and password (raspberry). | |
ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no -Y -6 pi@fe80::666c:c924:194c:1756%enx00e04c534458 |
NewerOlder