Skip to content

Instantly share code, notes, and snippets.

View naltatis's full-sized avatar

Michael Geers naltatis

View GitHub Profile
@naltatis
naltatis / evcc.10s.rb
Last active November 8, 2022 09:57
xbar and swiftbar plugin that shows evcc solar charging stats
#!/usr/bin/env ruby
# Metadata allows your plugin to show up in the app, and website.
#
# <xbar.title>evcc</xbar.title>
# <xbar.version>v1.0</xbar.version>
# <xbar.author>naltatis</xbar.author>
# <xbar.author.github>naltatis</xbar.author.github>
# <xbar.desc>shows evcc solar charging stats</xbar.desc>
# <xbar.image>https://imgur.com/G1N1Ke0</xbar.image>
@naltatis
naltatis / Counter.elm
Created January 26, 2016 20:58
elm-samples
module Counter (..) where
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Signal exposing (Address)
import StartApp.Simple as StartApp
-- MODEL

Keybase proof

I hereby claim:

  • I am naltatis on github.
  • I am naltatis (https://keybase.io/naltatis) on keybase.
  • I have a public key whose fingerprint is 5586 8688 B263 9CBE CFDC C13E 8160 7052 9CC6 5527

To claim this, I am signing this object:

@naltatis
naltatis / bot.php
Created June 28, 2011 20:13
php bot
<?php
$_GET['match_id'] // 447
$_GET['host_id'] // 10
$_GET['host_name'] // "SV Werder Bremen"
$_GET['guest_id'] // 20
$_GET['guest_name'] // "Hamburger SV"
// here goes you prediction magic
@naltatis
naltatis / bot.rb
Created June 28, 2011 19:15
ruby bot
require 'net/http'
# replace with you api-token from http://botliga.de/einstellungen
bot_token = "abc123"
# you find a full list with more data at http://botliga.de/datenquellen
next_matches = [14181, 14182, 14183]
http = Net::HTTP.new('botliga.de',80)
next_matches.each do |match_id|
@naltatis
naltatis / bot.txt
Created June 20, 2011 20:36
stupid dropbox bot
2:1
@naltatis
naltatis / server.js
Created June 20, 2011 20:31
node.js bot
express = require('express');
var app = express.createServer();
app.get('/guess', function(req, res){
// these are the parameter you get
req.param('match_id') // 447
req.param('host_id') // 10
req.param('host_name') // "SV Werder Bremen"
@naltatis
naltatis / facebook-xmpp.js
Created May 9, 2011 09:11
connecting to Facebook via node-xmpp
var client = new xmpp.Client({
jid: '[email protected]', // where 123456 is the users facebook id
api_key: apiKey, // api key of your facebook app
secret_key: secretKey, // secret key of your facebook app
session_key: sessionKey // users current session key
});
// you can find more details here http://developers.facebook.com/docs/chat/