This file contains hidden or 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
files: | |
"/tmp/proxy.conf": | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
proxy_send_timeout 1200; | |
proxy_read_timeout 1200; | |
send_timeout 1200; |
This file contains hidden or 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
package io.nervous.alarmtest; | |
import android.app.AlarmManager; | |
import android.app.PendingIntent; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.SharedPreferences; | |
import android.os.Build; | |
import android.os.Bundle; | |
import android.os.SystemClock; |
This file contains hidden or 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
package io.nervous.alarmtest; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.support.v4.content.WakefulBroadcastReceiver; | |
public class AlarmWakefulReceiver extends WakefulBroadcastReceiver { | |
@Override | |
public void onReceive(Context context, Intent intent) { |
This file contains hidden or 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
package io.nervous.alarmtest; | |
import android.app.IntentService; | |
import android.app.NotificationManager; | |
import android.app.PendingIntent; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.SharedPreferences; | |
import android.media.Ringtone; | |
import android.media.RingtoneManager; |
This file contains hidden or 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
(defn exec-chan | |
"spawns a child process for cmd with args. routes stdout, stderr, and | |
the exit code to a channel. returns the channel immediately." | |
[cmd args & [{:keys [chan]}]] | |
(let [c (or chan (a/chan)), p (spawn cmd args)] | |
(.on (.-stdout p) "data" #(put! c [:out (str %)])) | |
(.on (.-stderr p) "data" #(put! c [:err (str %)])) | |
(.on p "close" #(a/close! c)) | |
c)) |
This file contains hidden or 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
(ns ... | |
(:import [goog.net XmlHttp XmlHttpFactory]) | |
(:require [cljs.nodejs :as nodejs])) | |
(def xml-http-request | |
(-> (nodejs/require "xmlhttprequest") | |
(.. -XMLHttpRequest))) | |
(defn NodeXhrFactory [] | |
(this-as this (.call XmlHttpFactory this))) |
This file contains hidden or 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
(defn decrement! [[from-str from-chan] [to-str to-chan] & [start-value]] | |
(go-loop [n (or start-value (<! from-chan))] | |
(println from-str "sends" n "to" to-str) | |
(>! to-chan n) | |
(when-let [reply (<! from-chan)] | |
(println from-str "gets" reply) | |
(if (pos? reply) | |
(recur (dec reply)) | |
(do | |
(close! from-chan) |
This file contains hidden or 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
var BigNumber, crypto, parseNumeric, | |
isNumeric = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, | |
mathceil = Math.ceil, | |
mathfloor = Math.floor, | |
notBool = ' not a boolean or binary digit', | |
roundingMode = 'rounding mode', | |
tooManyDigits = 'number type has more than 15 significant digits', | |
ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_', | |
BASE = 1e14, | |
LOG_BASE = 14, |
This file contains hidden or 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
var path = require("path"), fs = require("fs") | |
var outputTo = process.argv[2] | |
var googBasedir = path.join(process.cwd(), outputTo, 'goog') | |
if (!fs.existsSync(googBasedir)) { | |
console.log("Error: goog directory doesn't exist: " + googBasedir) | |
process.exit(1) | |
} | |
var cljsOutputFile = process.argv[3] |
This file contains hidden or 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
Verifying that +nervous is my openname (Bitcoin username). https://onename.com/nervous |