Skip to content

Instantly share code, notes, and snippets.

Timan Rebel timanrebel

View GitHub Profile
@timanrebel
timanrebel / iSpindel Node red
Created Feb 16, 2020
iSpindel Node Red redistribution to brew father, brewer's friend and brewpi. Including minor dashboard
View iSpindel Node red
[{"id":"d6eba550.f7c5e","type":"tab","label":"iSpindel","disabled":false,"info":""},{"id":"46b76906.55c778","type":"tcp in","z":"d6eba550.f7c5e","name":"","server":"server","host":"","port":"8000","datamode":"single","datatype":"utf8","newline":",","topic":"ispindel","base64":false,"x":75,"y":189,"wires":[["dff2ea4a.2b706","3a0f71a8.a39be6"]]},{"id":"dff2ea4a.2b706","type":"json","z":"d6eba550.f7c5e","name":"","property":"payload","action":"","pretty":false,"x":235,"y":146,"wires":[["90a7fe17.eeb118"]]},{"id":"1b48e441.a7ab14","type":"ui_chart","z":"d6eba550.f7c5e","name":"","group":"90bfe9ea.7a7fa8","order":2,"width":"19","height":"9","label":"Temperature ºC","chartType":"line","legend":"false","xformat":"dd HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"-10","ymax":"30","removeOlder":"3","removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#e53b3c","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":91
@timanrebel
timanrebel / s3-invalidation.js
Created Apr 19, 2016 — forked from supinf/s3-invalidation.js
AWS Lambda script:: CloudFront Invalidations which are triggered by s3 events.
View s3-invalidation.js
console.log('Loading event');
var Q = require('q');
var aws = require('aws-sdk');
var cloudfront = new aws.CloudFront();
exports.handler = function (event, context) {
//_log('Received event: ', event);
var bucket = event.Records[0].s3.bucket.name;
@timanrebel
timanrebel / install.sh
Created Apr 10, 2016
Install pibus on OSMC
View install.sh
#!/bin/bash
HOMEDIR="/home/osmc"
apt-get -y update
apt-get -y upgrade
apt-get -y install cron psmisc
crontab -l | grep pibus > /dev/null
if [ $? != "0" ]; then
@timanrebel
timanrebel / svn-branches-git.sh
Last active Sep 14, 2015
SVN branches to Git branches on Mac OSX
View svn-branches-git.sh
git branch -r | grep -v tags | sed -Ene 's, *([^@]+)$,\1,p' | \
while read branch; \
do echo "git branch $branch $branch"; \
done | sh
@timanrebel
timanrebel / svn-tags-git.sh
Last active Sep 14, 2015
SVN tags to Git tags on Mac OSX
View svn-tags-git.sh
git branch -r | sed -Ene 's, *tags/([^@]+)$,\1,p' | \
while read tag; do \
echo "git tag $tag 'tags/${tag}^'; git branch -r -d tags/$tag"; \
done | sh
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:ce6138f557180950498d
Verifying that +timanrebel is my openname (Bitcoin username). https://onename.io/timanrebel
@timanrebel
timanrebel / gist:8505205
Created Jan 19, 2014
Platform and Density dependant images in Alloy widgets
View gist:8505205
app/widgets/sc.MenuBarButton/assets/android/images/res-xhpdi/like.png
becomes
Resources/android/android/images/res-xhdpi/sc.MenuBarButton/like.png
but is not displaying with
WPATH('/images/like.png')
@timanrebel
timanrebel / gist:7596146
Created Nov 22, 2013
Doing reverse Oauth with Ti.Social
View gist:7596146
// First do reverse Auth call
var Social = require('dk.napp.social');
var oauthString = '';
var jsOAuth = require('jsOAuth').OAuth;
var oauth = jsOAuth({
consumerKey: 'xxx',
consumerSecret: 'yyy'
});
oauth.request({
@timanrebel
timanrebel / index.xml
Created Jun 24, 2013
We use one codebase for our iOS and Android app and like to reuse as much code as possible. It is not possible however to use a Widget inside a <Menu> tag, but you can inside a <RightNavButton>. It would really simplify our lives if we could use Widgets and generalize our MenuBar buttons across platforms. I do get the following error however: [E…
View index.xml
<Alloy>
<Window>
<RightNavButton>
<Widget src="sc.MenuBarButton" title="Save" onClick="onSave" />
</RightNavButton>
<Menu>
<Widget src="sc.MenuBarButton" title="Save" onClick="onSave" />
</Menu>
</Window>
You can’t perform that action at this time.