This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/monkey/cancan/controller_resource.rb | |
module CanCan | |
class ControllerResource | |
protected | |
def strong_parameters? | |
@params.class.name == 'ActionController::Parameters' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'eventmachine' | |
module PushService::Gateways::Apns | |
class EMGateway | |
include PushService::Logging | |
class NotConnected < PushService::Error; end | |
def initialize | |
@error_callback = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz" | |
install_git "ruby-1.9.2-p290-railsexpress" "https://github.com/paukul/matzruby.git" "ruby192pl290railsexpress" autoconf standard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_gcc42_on_lion | |
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz" | |
install_git "ruby-1.8.7-p352-railsexpress" "https://github.com/skaes/matzruby.git" "ruby187pl352railsexpress" autoconf standard | |
install_package "rubygems-1.3.7" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz" ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the only dependencies are http://rubygems.org/gems/transitions | |
# and I think active support | |
module Search | |
module QueryBuilderHelper | |
def sanitize_field_for_solr_query(query) | |
if query.is_a?(Hash) | |
query.inject({}) do |result, query_component| | |
result[query_component.first] = query_component.first == '*' ? query_component.last : QueryField.sanitize(query_component.last) | |
result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Skype" | |
send command "SET USERSTATUS DND" script name "pomodoro" | |
end tell | |
tell application "Mail" to quit | |
tell application "Tweetie" to quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENV['RAILS_ENV'] = "test" | |
require 'test/unit/testsuite' | |
require 'test/unit/collector/objectspace' | |
require 'test/unit/ui/testrunnermediator' | |
require 'test/unit/ui/console/testrunner' | |
require 'test/unit/testresult' | |
require 'config/environment' | |
require 'drb' | |
no_workers = 4 |
NewerOlder