Skip to content

Instantly share code, notes, and snippets.

View pitosalas's full-sized avatar

Pito Salas pitosalas

View GitHub Profile
#!/usr/bin/env python
import rospy
import sys
import signal
import threading
import random
import time
from rosgraph_msgs.msg import Clock
from nav_msgs.msg import Odometry
@pitosalas
pitosalas / gist:ac32e79ebc5c4763e27dd19e60003a53
Created October 8, 2022 00:25
A solution to today's lab - Rails 7 Many to many
# to those of you who got stuck, here are some more hints. Note that there is more than one way to do this!
# Also note that I had to debug my solution a little too, I didn't get it the first few times!
#
# This is not one big file it is a series of key parts of the code
# Migrations
class CreateStudents < ActiveRecord::Migration[7.0]
def change
create_table :students do |t|
t.string :name
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/superset", line 33, in <module>
sys.exit(load_entry_point('apache-superset', 'console_scripts', 'superset')())
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
>> Copy 19 physical tables to sl_tables...
{
"version": 1,
"variables": [{
"names": ["login"],
"values": [
[
"user_id=304"
],
[
"user_id=303"
{
"version": 1,
"variables": [{
"names": ["login"],
"values": [
[
"user_id=6026"
],
[
"user_id=6026"
This file has been truncated, but you can view the full file.
time,field.header.seq,field.header.stamp,field.header.frame_id,field.angle_min,field.angle_max,field.angle_increment,field.time_increment,field.scan_time,field.range_min,field.range_max,field.ranges0,field.ranges1,field.ranges2,field.ranges3,field.ranges4,field.ranges5,field.ranges6,field.ranges7,field.ranges8,field.ranges9,field.ranges10,field.ranges11,field.ranges12,field.ranges13,field.ranges14,field.ranges15,field.ranges16,field.ranges17,field.ranges18,field.ranges19,field.ranges20,field.ranges21,field.ranges22,field.ranges23,field.ranges24,field.ranges25,field.ranges26,field.ranges27,field.ranges28,field.ranges29,field.ranges30,field.ranges31,field.ranges32,field.ranges33,field.ranges34,field.ranges35,field.ranges36,field.ranges37,field.ranges38,field.ranges39,field.ranges40,field.ranges41,field.ranges42,field.ranges43,field.ranges44,field.ranges45,field.ranges46,field.ranges47,field.ranges48,field.ranges49,field.ranges50,field.ranges51,field.ranges52,field.ranges53,field.ranges54,field.ranges55,field.ra
# routes.rb
get :show_form, to: 'users#show_form'
get :do_form, to: 'users#do_form'
# added to users_controller.rb
# GET /show_form
def show_form
end
# GET /do_form
{
"version": 1,
"variables": [{
"names": ["login"],
"values": [
[
"user_id=304"
],
[
"user_id=303"
@pitosalas
pitosalas / gist:033456da51039066f911fca0fd6f01a0
Created April 9, 2019 18:27
Official loader.io payload file
{
"version": 1,
"variables": [{
"names": ["login"],
"values": [
[
"user_id=7042"
],
[
"user_id=7204"
{
"version": 1,
"variables": [{
"names": ["login"],
"values": [
[
"user_id=7042"
],
[
"user_id=7204"