Skip to content

Instantly share code, notes, and snippets.

@Anton-2
Anton-2 / demo.js
Created May 7, 2016 16:49
react-three-renderer : can't change the number of vertices.
import React, { Component } from 'react';
import {render} from 'react-dom';
import React3 from 'react-three-renderer';
import THREE from 'three';
const DemoView = (props) => {
const vertices = [];
const {nbItems} = props;
const step = 10 / nbItems;
@Anton-2
Anton-2 / micropython clang makefile
Created August 2, 2014 17:40
Clang makefile for micropython/unix on mac os
include ../py/mkenv.mk
-include mpconfigport.mk
# define main target
PROG = micropython
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h
# OS name, for simple autoconfig
@Anton-2
Anton-2 / get_location.py
Created September 17, 2013 19:56
Hack used in pythonista to read the device geolocation info. This version adds some error handling, and the ability to control the geo location service options ( see http://diveintohtml5.info/geolocation.html ) The fake http protocol is very crude, it may be a better opttion to use python's BaseHTTPServer.
import socket
import webbrowser
import datetime
import json
from collections import namedtuple
class GeoLocationError(Exception):
def __init__(self, code, message):
@Anton-2
Anton-2 / get_location.py
Created September 17, 2013 05:58
get_location
import socket
import webbrowser
import re
html = """
<!DOCTYPE html>
<html>
<head>
<script>
@Anton-2
Anton-2 / get_location.py
Created September 16, 2013 22:19
get_location
import socket
import webbrowser
import re
html = """
<!DOCTYPE html>
<html>
<head>
<script>