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.
# 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"