Skip to content

Instantly share code, notes, and snippets.

View sachaarbonel's full-sized avatar
👨‍💻
Uncovering bugs

Sacha Arbonel sachaarbonel

👨‍💻
Uncovering bugs
View GitHub Profile
@adamgoose
adamgoose / client.go
Created December 28, 2018 06:24
A sloppy attempt at a GraphQL Subscription Client for golang
package subs
import (
"context"
"encoding/json"
"log"
"github.com/gorilla/websocket"
uuid "github.com/satori/go.uuid"
)
@mraleph
mraleph / ffi.md
Last active November 11, 2023 14:44

Dart VM FFI Vision

Background

The aim of Dart FFI project (tracked as Issue #34452) is to provide a low boilerplate, low ceremony & low overhead way of interoperating with native C/C++ code.

The motivation behind this project is twofold:

@slightfoot
slightfoot / charts.dart
Created October 10, 2018 20:10
Charts Demo - 10th October 2018 - #HumpdayQandA
import 'dart:math';
import 'package:flutter/material.dart';
void main() => runApp(ChartsDemoApp());
class ChartsDemoApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@lightdiscord
lightdiscord / netlify.sh
Last active July 5, 2021 15:20
Rust and wasm and netlify
#!/usr/bin/env bash
set -e
cweb_version=0.6.16
cweb=https://github.com/koute/cargo-web/releases/download/$cweb_version/cargo-web-x86_64-unknown-linux-gnu.gz
curl -Lo cargo-web.gz $cweb
gunzip cargo-web.gz
chmod u+x cargo-web
@kinlane
kinlane / cryptocompare-openapi.json
Created August 20, 2018 04:11
cryptocompare-openapi
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "Cryptocompare",
"description": "TODO: Add Description"
},
"host": "min-api.cryptocompare.com",
"basePath": "/",
"schemes": [
@montanaflynn
montanaflynn / context.go
Last active October 15, 2024 11:01
An example of using context to cancel goroutines between server handlers
package main
import (
"context"
"fmt"
"log"
"net/http"
"sync"
"time"
)
@aloisdeniel
aloisdeniel / build.dart
Last active April 5, 2019 04:55
Removing depdencies to flutter SDK into path_drawing
// Example of using parsed command to generate flutter code
var result = List<Code>();
final SvgPathStringSource parser = new SvgPathStringSource(svg);
final SvgPathNormalizer normalizer = new SvgPathNormalizer();
var segments = parser.parseSegments();
for (PathSegmentData seg in segments) {
result.addAll(normalizer.emitSegment(seg).map((c) => Code(_generateCommand(c).toString() + ";")));
}
@slightfoot
slightfoot / ios_android.dart
Created June 30, 2018 14:15
Example of using defaultTargetPlatform to change the entire widget tree based on platform.
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
//runApp(IOSApp());
//runApp(AndroidApp());
runApp(defaultTargetPlatform == TargetPlatform.iOS ? IOSApp() : AndroidApp());
}
#include <GraphDefDecryptor.hpp>
........
tensorflow::GraphDef graph;
// Decryption:
const std::string key = "JHEW8F7FE6F8E76W8F687WE6F8W8EF5";
auto status = tfsecured::GraphDefDecryptAES(path, // path to *.pb file (encrypted graph)
graph,
@andrelsmoraes
andrelsmoraes / bottom_sheet.dart
Created June 22, 2018 21:03
Modal Bottom Sheet with Input Fields fix for Flutter (Fix issue with overlap with keyboard and fix for tapping to dismiss) - Flutter Version: Channel beta, v0.5.1
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';