Skip to content

Instantly share code, notes, and snippets.

@jackgris
jackgris / instalarbbcascade.txt
Created August 29, 2013 03:36
Instalar el entorno de desarrollo de Blackberry 10 Cascade en ArchLinux
This document describes how to setup Qt 4.8.x and the BlackBerry NDK 2.x to deploy Qt applications to a PlayBook. Arch Linux (x64) was used, though you should be able to follow a similar process for any modern Linux distribution. Much of this information was taken from the QNX page on qt-project.org. I'm assuming that the normal QtSDK (Qt and QtCreator) are being used for development.
Setup and Install
Install Qt 4.8.x for Linux (ie, Qt for the dev machine)
Qt should be an available package for your distribution. If you don't already have it, install it.
Install Qt-Creator (should also be an available package).
Download and install Java
The BlackBerry NDK requires a 32-bit JRE. For 64 bit Arch, there's a bin32-jre AUR package available. Make sure to use the latest PKGBUILD (attached in the comments section of the preceding link). You'll also need the lib32-gtk2 package. For 64 bit Ubuntu, you only need the ia32-libs package (See the BBNDK release notes for more info). If you're running 32-bit linux, you on
@jackgris
jackgris / build.gradle
Last active December 30, 2015 06:49
Gradle configuration file, for projects in Android Studio: Frameworks: * Guava * JUnit * Robolectric * ActionBarSherlock * GreenDao src/test : this folder is for the tests with Robolectric and JUnit src/src-gen: this folder is for manage the project for greenDao Remember for run the tests, on the folder of the project: gradlew test
buildscript {
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
classpath 'com.squareup.gradle:gradle-android-test-plugin:0.9.1-SNAPSHOT'
@jackgris
jackgris / .hgignore
Created December 12, 2013 15:02
This is one possible configuration, for ignoring files on Mercurial, on Android Studio
# use syntax glob for this file
syntax: glob
#archivos con extensiones de configuracion local del proyecto o compilados
*.class
*.apk
*.dex
*.ap_
*.suo
*.properties
@jackgris
jackgris / emacs
Last active December 17, 2017 13:06
Possible settings for Emacs, with support for the Go language and more
;; ;;(add-to-list 'auto-mode-alist '("\\.jsx\\'" . web-mode))
;; ;;(add-to-list 'auto-mode-alist '("\\.js\\'" . web-mode))
;; ;;(setq web-mode-content-types-alist '(("jsx" . "*\\.js[x]?\\'"))
;; ; Para que el demonio de emacs cargue nuestro archivo de configuración,
;; ; el comando de inicio debería ser algo así:
;; ;; emacs -u usuario --daemon -l ~/.emacs
(require 'package)
(package-initialize)
@jackgris
jackgris / MyHausdorffDistanceImpl.java
Created April 15, 2014 17:35
Hausdorff distance, calculating similar polygons
/**
* This method will be used to calculate the Hausdorff distance
*
* @param distanceMax this is the value of the maximum distance to compare
* @param routeOne this is one of the routes to compare
* @param routeTwo this is one of the routes to compare
* @return returns true if the value of the maximum distance is not exceeded, false otherwise
*/
public boolean distanceHausdorff(final int distanceMax, LinkedList<Posicion> routeOne,
LinkedList<Posicion> routeTwo) {
@jackgris
jackgris / build.gradle
Created June 6, 2014 18:51
Example of use from Proguard, from Android Studio
buildscript {
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'com.squareup.gradle:gradle-android-test-plugin:0.9.1-SNAPSHOT'
@jackgris
jackgris / config.fish
Last active April 13, 2019 13:48
Example of config for fish shell
## Lenguaje Go
set --export GOROOT /usr/local/go
set -gx PATH /usr/local/go/bin $PATH
#set -gx PATH GOROOT/bin $PATH
set --export GOPATH $HOME/GoProjects
set -gx PATH $GOPATH/bin $PATH
## AppEngine para GO
set -gx PATH $HOME/programs/go_appengine $PATH
@jackgris
jackgris / gist:a62b65d673c6f8cf05fb
Last active April 29, 2021 23:29 — forked from necrobious/gist:14d78ee9b4caff766152
How install GHC and Cabal on Ubuntu
# build with
# docker build -t 'necrobious/haskell-ghc-7.8-64' .
FROM ubuntu:14.04
MAINTAINER [email protected]
ENV DEBIAN_FRONTEND noninteractive
####### Install Dependencies ###################################################
RUN apt-get -y update
@jackgris
jackgris / ActionBarHeight.java
Created October 24, 2014 15:11
How get height of ActionBarCompact
// Get height action bar compat
TypedValue tv = new TypedValue();
int attr = android.support.v7.appcompat.R.attr.actionBarSize;
if (getTheme().resolveAttribute(attr, tv, true)){
int actionBarHeight = TypedValue.complexToDimensionPixelSize(tv.data,getResources().getDisplayMetrics());
Log.w("ACTIONBAR", "height - " + actionBarHeight);
}
@jackgris
jackgris / japanese_chinese_input_in_manjaro.md
Last active September 22, 2020 13:05 — forked from jasonzhouu/chinese_input_in_manjaro.md
Config Chinese and Japanese input method in Manjaro

1. Install packages

run:

yay -S adobe-source-han-sans-otc-fonts adobe-source-han-serif-otc-fonts  adobe-source-han-sans-jp-fonts otf-ipafont
yay -S ttf-monapo

Make sure you have commented out (add # to comment out) the following line in /etc/locale.gen file.

#ja_JP.UTF-8