- Install BlackBerry 10 SDK
- Start the environment variable by sourcing
/Applications/Momentics.app/bbndk-env.sh
- Set the output dir for device and simulator e.g.
$HOME/Projects/qnxlib/arm
and$HOME/Projects/qnxlib/x86
- Execute
gtkdocize
- Execute
autoreconf --force --install --verbose
- Use this shell command to build
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 idler = uv_idle_t() | |
uv_idle_init(uv_default_loop(), &idler) | |
uv_idle_start(&idler, { (_:UnsafeMutablePointer<uv_idle_t>) -> Void in print("Yay")}) | |
print("Idling...") | |
uv_run(uv_default_loop(), UV_RUN_DEFAULT) | |
uv_loop_close(uv_default_loop()) |
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
import scala.collection.mutable.ListBuffer | |
import akka.actor.{Actor,ActorRef} | |
import akka.actor.Actor._ | |
import akka.routing.{ Listeners, Listen } | |
//Represents a domain event | |
trait Event | |
//A builder to create domain entities | |
trait EntityBuilder[Entity] { |
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
;; Depends on clj-http and cheshire | |
(ns com.ykode.social.fb-lite | |
(:require [clj-http.client :as client] | |
[cheshire.core :refer [parse-string]])) | |
(defn- fburl [ext] (str "https://graph.facebook.com/" ext)) | |
(defn- auth-get | |
[access-token url] |
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
;; Depends on | |
;; [org.kohsuke.github-api "1.56"] | |
;; [clj-time "0.8.0"] | |
;; Samples converting kohsuke's GH* objects to clojure map | |
;; may inefficient but it works | |
(ns com.ykode.social.github | |
(:import [org.kohsuke.github GitHub GHMyself GHUser GHRepository] | |
[java.net URL]) | |
(:require [clj-time.format :as tf] |
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
;; Wrapping facebook4j in Clojure | |
;; Please include org.facebook4j/facebook4j-core "2.1.0"] | |
;; in your project.clj | |
(ns com.ykode.social.fb ;; change the namespace as you wish | |
(:import [facebook4j Facebook FacebookException FacebookFactory] | |
[facebook4j.auth AccessToken])) | |
(defn- kw->perms | |
"Converting keyword array such as [:public_profile :email] |
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
(defmacro def-if | |
"Define a symbol when one condition is met" | |
([condition sym true-expr] | |
(if condition `(def sym ~true-expr))) | |
([condition sym true-expr false-expr] | |
(if condition `(def sym ~true-expr) `(def sym ~false-expr)))) |
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
;; Example Nested Map | |
(def persons [{:name "asep" :address {:street "prikici" :city "tangsel"}}, { | |
:name "didiet" :address {:street "mijil" :city "sleman"}}]) | |
;; Update Values | |
(defn update-vals [map vals f] | |
(reduce #(update-in % [%2] f) map vals)) | |
;; experiment | |
(def asep (first persons)) | |
(update-in asep [:address] (fn [m] (update-vals m [:street :city] clojure.string/upper-case))) |
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
# command to convert al-quran recitation from gq | |
ls sudais/*.mp3 | xargs -n 1 -P 10 -I % \ | |
bash -c 'echo Processing %; avconv -v quiet -i % -f wav - | ~/neroAacEnc -ignorelength -cbr 64 -hev2 -if - -of "sudais-aac/$(basename %).aac" > /dev/null 2>&1' |
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
export CLICOLOR=1 | |
export LSCOLORS=ExFxCxDxBxegedabagacad | |
function gitify { | |
default_prompt="-----------------------------------------\n\e[37;1m[ \w ]\e[0m\] @ \h (\u) \n=> " | |
git rev-parse --git-dir >/dev/null 2>&1 | |
if [ $? -eq 0 ]; then | |
light_green="\[\033[1;32m\]" | |
light_yellow="\[\033[1;33m\]" |