Skip to content

Instantly share code, notes, and snippets.

View xseignard's full-sized avatar
🦄
Internet thuggin'

Xavier Seignard xseignard

🦄
Internet thuggin'
View GitHub Profile
@xseignard
xseignard / xbee.ino
Created December 23, 2022 16:59 — forked from bgentry/xbee.ino
XBee ZigBee HA interaction, Arduino example
/**
This is an implementation of Zigbee device communication using an XBee
and a Centralite Smart Switch 4256050-ZHAC
dave (www.desert-home.com)
source: http://www.desert-home.com/2014/10/zigbee-protocol-xbee-but-this-time.html
*/
// This code will handle both a Uno and a Mega2560 by careful use of
// the defines. I tried it on both of them, and the only problem is that
@xseignard
xseignard / FastList.tsx
Created March 12, 2021 17:25 — forked from derekstavis/FastList.tsx
Discord's FastList, but in TypeScript
import { forEachObjIndexed } from "ramda";
import * as React from "react";
import {
Animated,
ScrollView,
View,
ViewStyle,
LayoutChangeEvent,
NativeScrollEvent,
} from "react-native";
#include <opencv2/opencv.hpp>
#include "./include/Processing.NDI.Lib.h"
using namespace cv;
using namespace std;
int main(int argc, char* argv[]) {
// Init opencv
VideoCapture capture(0);
sudo defaults write /Library/Preferences/com.apple.airport.bt.plist bluetoothCoexMgmt Hybrid
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 80
@xseignard
xseignard / state.json
Last active August 30, 2019 21:49 — forked from osarrouy/state.json
Fundraising React State | After Reducer
{
"constants": {
"PPM": BigNumber,
"PCT_BASE": BigNumber
},
"values": {
"maximumTapIncreasePct": BigNumber
},
"network": {
"id": Number,

Background script general structure

Overview tab

What we need here:

Price

Expressed in DAI

import Web3 from 'web3'
import provider from 'eth-provider'
import {
getAppLocator,
getDefaultEthNode,
getEthNetworkType,
getIpfsGateway,
} from './local-settings'
import { getNetworkConfig } from './network-config'
import { noop } from './utils'
const sha3 = require('js-sha3').keccak_256
const coder = require('web3/lib/solidity/coder.js')
const blockNumber = require('@aragon/test-helpers/blockNumber')(web3)
const FundraisingKit = artifacts.require('FundraisingKit')
const TokenMock = artifacts.require('TokenMock')
const Controller = artifacts.require('AragonFundraisingController')
const MarketMaker = artifacts.require('BatchedBancorMarketMaker')
<template lang="html">
<v-container v-if="clock" class="screen" fluid fill-height>
{{room.timer}}
</v-container>
<v-container v-else class="alert" fluid fill-height>
Some non-reactive stuff.
</v-container>
</template>
<script>
const { Machine, actions } = require('xstate');
const { interpret } = require('xstate/lib/interpreter');
const { send } = actions;
const myActions = {
resetRoom(ctx, e) {
// console.log('Reset room', ctx);
},
openIn(ctx, e) {