Skip to content

Instantly share code, notes, and snippets.

View uberswe's full-sized avatar

Uberswe uberswe

  • Västerås, Sweden
  • 01:42 (UTC +01:00)
View GitHub Profile
@pingud98
pingud98 / Particle.ino
Created March 23, 2019 18:12
Current beta code for the OpenAuto
//Open Auto code
//Arezzo release July 2018
//Released under the GPL V3.
//note that the number of live reservations in the system is stored in eeprom location 2046 (i.e. the last slot)
//ConfigCarFun
//Config string function - pass the master RFID and door mode via function.
//Car types
//1 = one button, wire to relay 1; pulse open, pulse close
@uberswe
uberswe / slack.php
Created September 14, 2016 19:15
Post updates to Slack with PHP
$message = "Hello this is a test!"; // The message you would like to send
$parameters = array(
'channel' => 'testing', // Simply type your channel name, make sure your bot is invited
'text' => html_entity_decode($message), // Good idea to decode
'as_user' => 'true');
// Use groups.list if you run into channel_not_found issues with private channels, make sure your bot is invited
$url = "https://slack.com/api/"."chat.postMessage"; // chat.postMessage is the method
$parameters['token'] = "MY-API-TOKEN"; // replace MY-API-TOKEN with the API Token for your bot
@uberswe
uberswe / json.php
Created December 19, 2015 00:21
PFSense simple json API
<?php
/**
* Created by PhpStorm.
* User: Markus Tenghamn
* Date: 18/12/15
* Time: 11:56
*
* Place this in /usr/local/www/ and access it to get basic data about your pfsense installation. Use at your own risk.
*
*/
@ljos
ljos / cocoa_keypress_monitor.py
Last active August 12, 2024 17:34
Showing how to listen to all keypresses in OS X through the Cocoa API using Python and PyObjC
#!/usr/bin/env python
#
# cocoa_keypress_monitor.py
# Copyright © 2016 Bjarte Johansen <[email protected]>
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# “Software”), to deal in the Software without restriction, including