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
package com.example.testwebsocket; | |
import org.json.JSONArray; | |
import org.json.JSONObject; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.util.Log; | |
import android.view.Menu; |
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
(defproject websocket "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:plugins [[lein-cljsbuild "1.0.3"]] | |
:dependencies [[org.slf4j/slf4j-simple "1.7.5"] | |
[org.clojure/clojure "1.6.0"] | |
[org.clojure/data.json "0.2.2"] | |
[me.raynes/fs "1.4.4"] |
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
{:user | |
{:profiles {:dev {:plugins [[com.keminglabs/cljx "0.6.0"]]}} | |
:dependencies [[org.clojure/tools.namespace "0.2.4"] | |
[spyscope "0.1.4"] | |
[redl "0.2.2"]] | |
:plugins [[lein-try "0.4.1"] | |
[mies/lein-template "0.6.0"] | |
[cljs-template/lein-template "0.1.6"] | |
[lein-pprint "1.1.1"] | |
[lein-marginalia "0.7.1"] |
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 'cl) | |
(defconst ircpinger-nick "pinger-robot" | |
"The IRC nick of the robot.") | |
(defconst ircpinger-joinlist '() | |
"List of channels the robot should join.") | |
(defconst ircpinger-server "" | |
"Server name to connect to.") | |
(defconst ircpinger-logging nil) | |
(defun ircpinger-robot-channel-buffer-list () |
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
(ns green-eggs.core | |
(:require [clojure.core.async :as async])) | |
(def green-eggs-n-ham | |
["in the rain" | |
"on a train" | |
"in a box" | |
"with a fox" | |
"in a house" |
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
-module(band_supervisor). | |
-behavior(supervisor). | |
-export([start_link/1]). | |
-export([init/1]). | |
start_link(Type) -> | |
supervisor:start_link({local, ?MODULE}, ?MODULE, Type). |
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
#!/bin/bash | |
_TPL='http://makeitpersonal.co/lyrics?artist=<artist>&title=<title>' | |
_SRY="sorry there is no lyrics for this song" | |
[ "$1" ] && _PATH="$1" || _PATH=$PWD | |
cd $_PATH | |
for _FILE in {*.mp3,*.m4a}; do |
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
=== LFE friday by Robert Virding === | |
#lists:any/2 takes a predicate function as the first argument, and a list to iterate over as its second argument. lists:any/2 returns true if the predicate function returns true for any of the elements in the given list, otherwise, lists:any/2 returns false. | |
> (lists:any #'erlang:is_atom/1 '(1 2 3 4 5 6 7)) | |
false | |
> (lists:any #'erlang:is_atom/1 '(1 2 3 4 a 6 7)) | |
true | |
> (lists:any #'erlang:is_atom/1 '(#(1 2) 3 4 a 6 7)) | |
true | |
> (lists:any (lambda (x) (== (rem x 2) 1)) '(1 2 4)) |
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
;; check OS type | |
(cond | |
((string-equal system-type "windows-nt") | |
(progn | |
(message "Windows Worst System operative") ) | |
) | |
((string-equal system-type "darwin") | |
(progn | |
(message "Mac OS") | |
) |
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
(defproject om-next-demo "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:jvm-opts ^:replace ["-Xms512m" "-Xmx512m" "-server"] | |
:dependencies [[org.clojure/clojure "1.7.0"] | |
[org.clojure/clojurescript "1.7.122" :classifier "aot"] |
OlderNewer