This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import Plot from "react-plotly.js"; | |
const BarChart = ({ arr = false, obj, rect, title }) => { | |
if (!rect) { | |
return null; | |
} | |
const { height, width } = rect; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////// | |
// INSTRUCTIONS // | |
////////////////// | |
// Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center). | |
// Input: root = [1,2,2,3,4,4,3] | |
// Output: true | |
// Input: root = [1,2,2,null,3,null,3] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Keen = new KeenAnalysis({ | |
projectId: config.getString('keen.libraryClient.projectId'), | |
masterKey: config.getString('keen.masterKey') | |
}) | |
... | |
const keenURL = { | |
url: Keen.url('events'), | |
api_key: Keen.masterKey(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CSRFProtection: (req, publicRoutes = false) => { | |
if (req.headers['x-sboauth']) { | |
const userProfile = jwt_decode(req.headers['x-sboauth']); | |
console.log('============ USER PROFILE FROM SBOAUTH ============'); | |
console.log({ userProfile }); | |
req.user = userProfile; | |
return; | |
} | |
if (publicRoutes) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.post('/cookie', (req, res) => { | |
const localhost = req.headers.referer.includes('localhost'); | |
const decodedJWT = jwt_decode(req.body.token); | |
let expiration = decodedJWT.expiration; | |
expiration = Number(expiration); | |
expiration = | |
typeof expiration === 'number' && expiration > Date.now() | |
? expiration | |
: new Date(Date.now() + TEN_HOURS); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { Button as SemanticButton } from "semantic-ui-react"; | |
import styled from "styled-components"; | |
const BaseButton = styled(SemanticButton)` | |
color: white !important; | |
font-family: Rubik, sans-serif !important; | |
font-weight: 800 !important; | |
&.disabled { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vuzix.blade.devkit.sensors_sample; | |
import android.content.Context; | |
import android.hardware.Sensor; | |
import android.hardware.SensorEvent; | |
import android.hardware.SensorEventListener; | |
import android.hardware.SensorManager; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.widget.TextView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mpaccione@mpaccione:~/Projects/ARGlasses/vuzix$ systemctl enable bluetooth | |
Synchronizing state of bluetooth.service with SysV service script with /lib/systemd/systemd-sysv-install. | |
Executing: /lib/systemd/systemd-sysv-install enable bluetooth | |
mpaccione@mpaccione:~/Projects/ARGlasses/vuzix$ systemctl status blueooth | |
Unit blueooth.service could not be found. | |
mpaccione@mpaccione:~/Projects/ARGlasses/vuzix$ journalctl -xe | |
May 18 21:21:22 mpaccione polkitd(authority=local)[1628]: Unregistered Authentication Agent for unix-process:21290:499588 (system bus name :1.712, object path /org/freed> | |
May 18 21:21:22 mpaccione polkitd(authority=local)[1628]: Registered Authentication Agent for unix-process:21327:499856 (system bus name :1.716 [/usr/bin/pkttyagent --no> | |
May 18 21:21:23 mpaccione systemd[1]: apt-daily.service: Succeeded. | |
░░ Subject: Unit succeeded |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARNING: Unknown mouse action value: 'do_action, close_current' | |
Xlib: extension "XINERAMA" missing on display ":0". | |
WARNING: Could not get xinerama screen info. Falling back to single monitor mode. | |
DEBUG: RUN | |
Xlib: extension "RANDR" missing on display ":0". | |
DEBUG: XEvent: Ignoring '65' | |
DEBUG: XEvent: processing 'CreateNotify' | |
DEBUG: XEvent: Checking for active screen changes | |
DEBUG: XEvent: Checking for active screen changes | |
Xlib: extension "RANDR" missing on display ":0". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name of display: :0 | |
version number: 11.0 | |
vendor string: The X.Org Foundation | |
vendor release number: 12009000 | |
X.Org version: 1.20.9 | |
maximum request size: 16777212 bytes | |
motion buffer size: 256 | |
bitmap unit, bit order, padding: 32, LSBFirst, 32 | |
image byte order: LSBFirst | |
number of supported pixmap formats: 7 |
NewerOlder