Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mphuie on github.
  • I am mphuie (https://keybase.io/mphuie) on keybase.
  • I have a public key ASDiC-wEiFRXiz2qIFKHcy0Nrorj7p27e1JIgLweSk7Gkgo

To claim this, I am signing this object:

@mphuie
mphuie / client.imba
Created July 22, 2019 16:43
stock app in imba
var data =
results: []
tag App
def mount
var resp = await window.fetch "https://api.steinhq.com/v1/storages/5d2aae71490adc53ef5c2a6c/Sheet1"
data:results = await resp.json
Imba.commit
@mphuie
mphuie / start.py
Created February 21, 2019 16:43
python activate virtualenv in script
#!/usr/bin/env python3
import platform
from os import getcwd
def main():
from app import app
app.run(debug=True)
@mphuie
mphuie / main.dart
Created August 2, 2018 17:29
Hello world in flutter
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
@mphuie
mphuie / index.html
Last active November 10, 2024 17:30
pyqt webview javascript -> python example
<html>
<head>
<script src="qrc:///qtwebchannel/qwebchannel.js"></script>
<style>
::selection {
background:transparent;
}
</style>
</head>
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Python flask app"
if __name__ == "__main__":
@mphuie
mphuie / mutation.py
Created January 4, 2018 05:41
graphql graphene simple mutation
class User(graphene.ObjectType):
id = graphene.ID()
firstname = graphene.String()
lastname = graphene.String(required=False)
class Mutation(graphene.ObjectType):
create_user = graphene.Field(User, firstname=graphene.String(required=True), lastname=graphene.String())
@mphuie
mphuie / app.js
Created December 30, 2017 23:46
basic angularjs/angular1 graphql query using $http
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope, $http) {
query = `{ allItems {
id
}}`
$http
.post('<graphql endpoint>', { query: query })
.then(function(resp) {
$scope.response = resp.data
@mphuie
mphuie / docker-compose.yaml
Created August 28, 2017 21:18
Riemann and Riemann dashboard docker compose file
version: "2"
services:
riemann:
image: rlister/riemann
ports:
- "5555:5555"
- "5555:5555/udp"
- "5556:5556"
volumes:
- /root/riemann.config:/app/etc/riemann.config
@mphuie
mphuie / keybase.md
Created June 8, 2017 23:28
keybase pgp

Keybase proof

I hereby claim:

  • I am mphuie on github.
  • I am mphuie (https://keybase.io/mphuie) on keybase.
  • I have a public key whose fingerprint is 8EA2 6A47 E752 F79A B53F B540 ACA7 1627 511D 7409

To claim this, I am signing this object: