Skip to content

Instantly share code, notes, and snippets.

View goldbattle's full-sized avatar

Patrick Geneva goldbattle

View GitHub Profile
{
"_id": "a5430fbf-cda9-4a23-bfbd-580a56133778",
"created_at": "2023-05-18T13:52:18.082-04:00",
"channel_id": "26301881",
"content_type": "video",
"content_id": "1823185891",
"content_offset_seconds": 123.391516992,
"commenter":
{
"display_name": "BraveShadow",
# to fix cookie problem because not behind proxy
# need to remove the following
# https://github.com/overleaf/overleaf/issues/1032#issuecomment-1279719119
SHARELATEX_SITE_URL
SHARELATEX_SECURE_COOKIE
SHARELATEX_BEHIND_PROXY
# docker in unraid cmd
docker container ls
/**
* @brief Given a gravity vector, compute the rotation from the inertial reference frame to this vector.
*
* The key assumption here is that our gravity is along the vertical direction in the inertial frame.
* We can take this vector (z_in_G=0,0,1) and find two arbitrary tangent directions to it.
* https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process
*
* @param gravity_inI Gravity in our sensor frame
* @param R_GtoI Rotation from the arbitrary inertial reference frame to this gravity vector
type: vertical-stack
title: Containers Running
cards:
- type: custom:auto-entities
card:
type: custom:layout-card
layout_type: horizontal
layout_options:
width: 120
max_cols: 5
int n = (int)Amm.rows();
double **M = new double *[n];
double *evals = new double[n]; // Store the eigenvalues here.
double **evecs = new double *[n]; // Store the eigenvectors here.
for (int r = 0; r < n; r++) {
M[r] = new double[n];
evecs[r] = new double[n];
for (int c = 0; c < n; c++) {
M[r][c] = Amm(r, c);
}
@goldbattle
goldbattle / tailscale_install_comma3.sh
Last active January 11, 2023 05:15
Tailscale install on comma3n with ssh enabled
#!/usr/bin/bash
# Tailscale install on comma3
# https://discord.com/channels/469524606043160576/524594418628558878/946342467307974658
# tested over comma serial, might need sudo otherwise...
sudo mount -o remount,rw /
curl -fsSL https://tailscale.com/install.sh | sh
sudo sed -i 's/--state=\/var\/lib\/tailscale\/tailscaled\.state --socket=\/run\/tailscale\/tailscaled\.sock /--state=\/data\/tailscaled.state /g' /lib/systemd/system/tailscaled.service
"""
Drawers for various edge styles in graph plots.
"""
__all__ = (
"AbstractEdgeDrawer",
"AlphaVaryingEdgeDrawer",
"ArrowEdgeDrawer",
"DarkToLightEdgeDrawer",
"LightToDarkEdgeDrawer",
from igraph import *
# Create graph
g = Graph(directed=True)
# Add 5 vertices
g.add_vertices(5)
# Add ids and labels to vertices
for i in range(len(g.vs)):
// ==UserScript==
// @name HN Favicons
// @namespace https://campital.xyz/
// @version 0.3.1
// @license MIT
// @description Favicons for Hacker News
// @match https://*.ycombinator.com/*
// @grant GM.addElement
// ==/UserScript==
D = sym('D',[3,3])
d = sym('d',[3,1])
lambda = sym('lambda');
g = sym('g');
assume(D,'real')
assume(d,'real')
assume(lambda,'real')
assume(g,'real')