Skip to content

Instantly share code, notes, and snippets.

View Victorvikson1996's full-sized avatar
:octocat:
Working from home

Victor Ezea Victorvikson1996

:octocat:
Working from home
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import hashlib
import random
import time
from collections import defaultdict
class Transaction:
def __init__(self, sender, recipient, amount, timestamp=None):
self.sender = sender
self.recipient = recipient
self.amount = amount
@Victorvikson1996
Victorvikson1996 / gist:33345a608acb87b35e0398b37257d985
Created January 10, 2024 20:51 — forked from dbaldwin/gist:b31835f87f16450a956cf3c89e15a289
Unitree Go1 Wireless Network Setup for Low Level Control with Windows and Docker
# From Windows terminal
docker run -p 6080:80 --shm-size=512m --name ros_go1 -d tiryoh/ros-desktop-vnc:melodic
# Access the instance through the url
http://localhost:6080
# From home directory in Docker
mkdir -p catkin_ws/src
# Go into catkin workspace
docker run -p 6080:80 --shm-size=512m tiryoh/ros2-desktop-vnc:foxy
# Go to http://localhost:6080 and open a terminal
# Menu > System Tools > MATE Terminal
sudo apt update
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
export const Colors = {
primary: '#22C55E',
darkPrimary: '#15803D',
faintPrimary: '#D5EED6',
tintPrimary: '#F0FDF4',
background: '#F8F8F8',
secondary: '#062638',
textDark: '#191A1C',
text: '#4B5563',
function replaceUri(uri) {
if (uri.startsWith('ipfs')) {
return uri.replace('ipfs://', 'https://ipfs.io/ipfs/');
}
return uri;
}
async function fetchImageUri(uri) {
if (!uri) {
import { createSlice } from '@reduxjs/toolkit';
const authSlice = createSlice({
name: 'auth',
initialState: {
user: null,
isLoading: false,
error: null,
},
reducers: {
import { createSlice } from '@reduxjs/toolkit';
const initialState = {
senderLocation: null,
receiverLocation: null,
// other state properties...
};
const locationSlice = createSlice({
name: 'location',
import { createSlice } from '@reduxjs/toolkit';
const initialState = {
senderLocation: null,
receiverLocation: null,
// other state properties...
};
const locationSlice = createSlice({
name: 'location',
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
const rideRequestSlice = createSlice({
name: 'rideRequest',
initialState: {
address: '',
deliveryDetails: '',
isLoading: false,
error: null,
},