- 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
sudo port -n upgrade --force perl5.12 apr | |
sudo port upgrade subversion-perlbindings |
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
/* | |
* Copyright (c) 2012, Muhammad Sumyandityo Noor | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* - Redistributions of source code must retain the above copyright notice, | |
* this list of conditions and the following disclaimer. | |
* - Redistributions in binary form must reproduce the above copyright notice, |
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
#include <QScopedPointer> | |
class PlayerData | |
{ | |
public: | |
PlayerData() : health(100), atk(10), agi(10), name (new char[255]) {} | |
~PlayerData() { delete [] name; } | |
char *name; | |
int health, atk, agi; | |
}; |
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
NM=ntoarmv7-nm LD=ntoarmv7-ld STRIP=ntoramv7-strip RANLIB=ntoarm7-ranlib OBJDUMP=ntoarm7-objdump AR=ntoarmv7-ar CC=qcc -Vgcc_ntoarmv7le_gpp CFLAGS=-I${QNX_TARGET}/usr/include -I${QNX_TARGET}/usr/include/cpp/c -I${QNX_TARGET}/usr/include/cpp ./configure --build x86_64 --host arm --target arm --prefix=${HOME}/Projects/qnx-bin/device |
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
#include <Windows.h> | |
#include <tchar.h> | |
#define CURRENT_WND_CLASS _T("GameWndClass_Didiet") | |
#define DEF_CX 800 | |
#define DEF_CY 600 | |
LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM ); | |
INT WINAPI _tWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow ) |
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\]" |
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
;; 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
(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)))) |