pip3 install python-rtmidi
python3 chip_midi_delegate.py
| #!/bin/sh | |
| # This program gets the battery info from PMU | |
| # Voltage and current charging/discharging | |
| # | |
| # Nota : temperature can be more than real because of self heating | |
| ####################################################################### | |
| # Copyright (c) 2014 by RzBo, Bellesserre, France | |
| # | |
| # Permission is granted to use the source code within this | |
| # file in whole or in part for any use, personal or commercial, |
| import time | |
| import os | |
| try: | |
| toggle = False | |
| while True: | |
| if toggle: | |
| os.system('sudo i2cset -f -y 0 0x34 0x93 0x1') | |
| time.sleep(0.1) | |
| else: |
| ➜ axoloti git:(master) cd platform_osx | |
| ➜ platform_osx git:(master) ./build.sh | |
| mkdir: bin: File exists | |
| mkdir: lib: File exists | |
| mkdir: src: File exists | |
| % Total % Received % Xferd Average Speed Time Time Time Current | |
| Dload Upload Total Spent Left Speed | |
| 0 399 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 | |
| 0 487 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 | |
| 0 401 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 |
| worker_processes 1; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; |
| var gume = (function($){ | |
| var can, ctx, plas, me, ks, ysp; | |
| var con={lk:65,rk:68,uk:87,sth:20,stw:200, grav: .3} | |
| function init(){ | |
| plas=[]; | |
| ks={}; | |
| ysp=con.grav; | |
| if($('#gume')) $('#gume').remove(); | |
| can=$('<canvas>').attr('id', 'gume').attr('width', con.stw).attr('height', con.sth); | |
| can.css('position', 'absolute').css('top', 0).css('left', 0).css('z-index', 100000); |
| <snippet> | |
| <content><![CDATA[ | |
| define([ | |
| ], | |
| function() { | |
| function ${1:Module}() { | |
| } |
| (function($){ | |
| var points=0; | |
| function go(){ | |
| $($("div:visible,span:visible,p:visible").get().sort(function(){ | |
| }).slice(0,1)[0]).append($('<span>').html('Waldow').css({ "opacity": 0.3,"z-index":1111, "cursor":'pointer}).click(function(e){ | |
| return Math.round(Math.random())-0.5 | |
| e.stopPropagation(); | |
| e.preventDefault(); | |
| points++; | |
| console.log(points); |
| =========================================================================== | |
| APACHE | |
| How to get "anysubdomain.mydomain.com" automatically routed to a directory? | |
| =========================================================================== | |
| 1.) enable mod_vhost_alias (create symlink in mods-enabled) |