Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Taym95's full-sized avatar
🛠️
Debugging!

Taym Haddadi Taym95

🛠️
Debugging!
View GitHub Profile
@Taym95
Taym95 / WebZigbee.js
Created February 17, 2022 16:00
Web Zigbee
const device = await navigator.bluetooth.requestDevice({
filters: [{ services: ["services"] }],
optionalServices: ["services"],
});
const server = await device.gatt.connect();
const service = await server.getPrimaryService("services");
const characteristic = await service.getCharacteristic("characteristic");
await characteristic.writeValue(payload);
@Taym95
Taym95 / react-native-view-shot-with-modal.js
Last active March 5, 2019 12:47
Take screenshot of a modal with react-native-view-shot
class ExampleCaptureModal extends Component {
onCapture = uri => {
this.refs.viewShot.capture().then(uri => {
console.log("do something with ", uri);
});
}
render() {
return (
<ViewShot ref="viewShot" options={{ format: "jpg", quality: 0.9 }}>
<Modal>Your Modal content</Modal>
config.after_initialize do
system " cd Front-end && yarn start "
end