- 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
<html> | |
<head> | |
<script type="text/javascript"> | |
// A CSRF token is required when making post requests in Django | |
// To be used for making AJAX requests in script.js | |
window.CSRF_TOKEN = "{{ csrf_token }}"; | |
</script> | |
</head> | |
<body> | |
<h2>My Blog Posts</h2> |
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 | |
knex@0.21.1 /home/nicholas/dev/SANDBOX/knex | |
├── colorette@1.1.0 | |
├── commander@5.1.0 | |
├─┬ debug@4.1.1 | |
│ └── ms@2.1.2 | |
├── esm@3.2.25 | |
├── getopts@2.2.5 | |
├── inherits@2.0.4 | |
├── interpret@2.0.0 |
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
# 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
# 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
# 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
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
# 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 |
NewerOlder