Skip to content

Instantly share code, notes, and snippets.

View paukul's full-sized avatar

Pascal Friederich paukul

View GitHub Profile
@paukul
paukul / em_gateway.rb
Created June 21, 2012 16:11
eventmachine based apns push service implementation
require 'eventmachine'
module PushService::Gateways::Apns
class EMGateway
include PushService::Logging
class NotConnected < PushService::Error; end
def initialize
@error_callback = nil
# lib/monkey/cancan/controller_resource.rb
module CanCan
class ControllerResource
protected
def strong_parameters?
@params.class.name == 'ActionController::Parameters'
end
@paukul
paukul / worker.go
Last active August 29, 2015 14:15
simple queue manager
D: {{device_1 apn [HSV CL] asdf} 1 f4bac0f8-9d4e-4a4b-4c94-066661982203}
D: {{device_1 apn [HSV CL] asdf} 1 12f9cbac-e5dd-47ea-5e67-840bb4378945}
R: {{device_1 apn [HSV CL] asdf} 3 6ea977d4-ec97-4653-5d3f-6aedd6407f91}
D: {{device_1 apn [HSV CL] asdf} 1 abdaa11e-0274-4c2b-6dcd-9d41eb303f3c}
R: {{device_1 apn [HSV CL] asdf} 2 7e3e2a04-6f0a-434c-6488-b6c4f21ac2d6}
R: {{device_1 apn [HSV CL] asdf} 2 e8d629eb-541f-4a00-50aa-4ffd473c129f}
R: {{device_1 apn [HSV CL] asdf} 2 1e1273fb-94bd-4d30-417d-587a0d800a6c}
D: {{device_1 apn [HSV CL] asdf} 1 41669839-e220-43f9-4e7b-7178ef41dc76}
D: {{device_1 apn [HSV CL] asdf} 1 57201b63-a648-4327-6608-f9015fc2e52a}
R: {{device_1 apn [HSV CL] asdf} 2 ca1ac428-86f2-413c-52cf-8059b16e6883}
/*
Basic Arduino example for K-Series sensor
Created by Jason Berger
Co2meter.com
Rewritten for WiFi-functionality of an ESP8266
and connected to a Senseair S8 CO2-sensor
20151116: Added Philips Hue functionality
by Markus Ulsass
*/
@paukul
paukul / gcm-high-prio.sh
Created November 21, 2017 23:47 — forked from sebastianbenz/gcm-high-prio.sh
Send high priority GCM messages via curl (Android Doze mode & App Standby testing)
curl -X POST \
-H "Authorization: key= YOUR-API-KEY" \
-H "Content-Type: application/json" \
-d '{
"registration_ids": [
"YOUR-GCM-REGISTRATION-ID"
],
"data": {
"message": "Hello Message"
},