Skip to content

Instantly share code, notes, and snippets.

View OsQu's full-sized avatar

Oskari Virtaoja OsQu

View GitHub Profile
@OsQu
OsQu / gist:4721193
Last active December 12, 2015 05:19
# Poller.coffee
class Poller
constructor: ->
@stream = new Bacon.Bus()
start: ->
@interval = setInterval pollPhoneLocation, 5 * 60
stop: ->
clearInterval @interval
@OsQu
OsQu / app.rb
Created February 11, 2014 15:11
Authorize flowdock with OAUTH and list flows
require 'sinatra'
require 'faraday'
require 'multi_json'
get "/" do
send_file 'initial.html'
end
get "/callback" do
conn = Faraday.new(url: "https://api.flowdock.com/")
@OsQu
OsQu / api.html
Created February 11, 2014 15:31
Fetching flows using API Token
<html>
<body>
<ul id="list">
</ul>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
var token = "MY_TOKEN";
$.ajax({
@OsQu
OsQu / gist:10018612
Created April 7, 2014 11:30
keybase.md
### Keybase proof
I hereby claim:
* I am OsQu on github.
* I am osqu (https://keybase.io/osqu) on keybase.
* I have a public key whose fingerprint is A06F 0B32 C94E B197 8A28 73C6 E422 FE9E E167 A8BA
To claim this, I am signing this object:
#!/usr/bin/env ruby
require 'JSON'
if File.exists?("package.json")
package_json = JSON.load(File.read("package.json"))
engines = package_json["engines"]
node_version = if !engines.nil? && engines.has_key?("node")
engines["node"]
else
nil
def foo
puts "this is a test"
end
@OsQu
OsQu / DSL.hs
Last active July 16, 2017 16:03
FreeMonad + Interpreter
module DSL
( get
, set
, end
, DSL(..)
) where
import Control.Monad.Free
data DSL next = Get String (String -> next)
@OsQu
OsQu / doc.md
Created July 18, 2019 09:57
Statsd + InfluxDB + Grafana

Statsd + InfluxDB + Grafana

  +-------------+       +--------+     Flush     +----------+
  |             |  Push |        |  Periodically            |
  | Application +-------> StatsD +---------------> InfluxDB |
  |             |       |        |               |          |
  +-------------+       +--------+               +-----^----+
                                                       |

|