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 / midi.js
Created October 1, 2013 16:31
send midi messages with node.js
var midi = require('midi'),
midiOut = new midi.output();
try {
midiOut.openPort(0);
} catch(error) {
midiOut.openVirtualPort('');
}
var loop = function() {
@xseignard
xseignard / merge_lcov
Last active June 22, 2022 12:47
Merge lcov files
#!/bin/bash
while read FILENAME; do
LCOV_INPUT_FILES="$LCOV_INPUT_FILES -a \"$FILENAME\""
done < <( find $1 -name lcov.info )
eval lcov "${LCOV_INPUT_FILES}" -o $1/$2
@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
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'
@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

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')