Skip to content

Instantly share code, notes, and snippets.

Avatar

Caleb CalebEverett

View GitHub Profile
@CalebEverett
CalebEverett / deser_example.rs
Created Sep 25, 2021
Rust deserialize json string in json field
View deser_example.rs
use std::collections::HashMap;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let fields: Vec<&str> = vec![
"id",
"artistName",
"curationStatus",
"dynamic",
"name",
@CalebEverett
CalebEverett / build.yaml
Last active Mar 3, 2021
Github actions build for cscs_utils
View build.yaml
name: build status
env:
CANVAS_TOKEN: ${{ secrets.CANVAS_TOKEN }}
CANVAS_URL: https://canvas.harvard.edu
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
CSCI_SALT: ${{ secrets.CSCI_SALT }}
on:
push:
View gha_build
name: CI/CD
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CANVAS_ASSIGNMENT_ID: 442683 # Test Assignment
@CalebEverett
CalebEverett / caleb.gin
Created Dec 30, 2020
config.gin for learning trax
View caleb.gin
import trax.layers
import trax.models
import trax.optimizers
import trax.data.inputs
import trax.supervised.trainer_lib
# Parameters that will vary between experiments:
# ==============================================================================
max_len = 128
@CalebEverett
CalebEverett / appinst.sh
Last active Oct 18, 2018
Bash Script to Launch LXC Container
View appinst.sh
#!/bin/bash
# variables
CONTAINER=mycontainer
IMAGE=ubuntu-daily:xenial
PORT=8080
PROFILES=default
FOLDER=app
REPO=https://github.com/CalebEverett/hello-lxd.git
RUN_USER=app
@CalebEverett
CalebEverett / events-websock.js
Last active Sep 30, 2021
Lxd api example: lxc exec and operations websocket via nodejs
View events-websock.js
const fs = require('fs')
const WebSocket = require('ws');
const wsoptions = {
cert: fs.readFileSync('../../.config/lxc/client.crt'),
key: fs.readFileSync('../../.config/lxc/client.key'),
rejectUnauthorized: false
}
var ws = new WebSocket('wss://127.0.0.1:8443/1.0/events?type=operation', wsoptions);
View gist:ad8dda9e93ccad1c37ae
```
caleb.everett@Caleb-Laptop-New MINGW64 /d/projects/rrum (toolbox)
$ npm run dev
> react-redux-universal-hot-example@0.0.5 dev D:\projects\rrum
> concurrent --kill-others "npm run watch-client" "npm run start-dev" "npm run start-dev-api"
[0]
[0] > react-redux-universal-hot-example@0.0.5 watch-client D:\projects\rrum
[0] > node ./node_modules/better-npm-run watch-client
@CalebEverett
CalebEverett / gist:712fb3948d2695a95957
Last active Jan 26, 2017
Help with material-ui leftNav,react-router and redux
View gist:712fb3948d2695a95957

I am having trouble getting this to work. I'm trying to get the material ui leftNav to work with react router and redux with nav going through the store and router. This was close, but didn't get all the way to the menu item.

TypeError: Cannot read property 'isActive' of undefined

I was also referring to these examples: https://github.com/callemall/material-ui/blob/master/docs/src/app/components/app-left-nav.jsx

http://codetheory.in/react-integrating-routing-to-material-uis-left-nav-or-other-components/