Skip to content

Instantly share code, notes, and snippets.

@Liryna
Liryna / ARMDebianUbuntu.md
Last active May 20, 2024 15:04
Emulating ARM on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

@ricardoalcocer
ricardoalcocer / themes.md
Last active October 15, 2021 08:10
Changing Android ActionBar Theme and Android Style

Customizing the overall App Style

This guide has been updated for Titanium SDK 3.3.0 which uses AppCompat to bring the ActionBar to Android 2.3.x

Android has a build-in theming system. Using this feature you can easily change the base color Android uses for its controls across your app, allowing you to provide better branding and personalization, while maintaining Android's UI and UX.

Android built-in themes are:

  • Holo (Mostly Black and Cyan)
  • Holo Light (Mostly White and Gray)
@nuno
nuno / titaniumAlphaColor
Last active December 18, 2019 15:01
Transparency in background of views in Appcelerator Titanium Titanium supports the RGBA color space which means you can use transparent colors! Via: https://coderwall.com/p/pu4isw
var viewWithTransparentBackground = Titanium.UI.createView({
backgroundColor: 'rgba(0,0,0,0.5)' // RGB way: Black background at 0.5 alpha
});
//OR
var viewWithTransparentBackground = Titanium.UI.createView({
backgroundColor: "#50ff0000" // hex way: red background at 0.5 alpha
});
@mguymon
mguymon / websocket.conf
Created June 11, 2013 14:05
stunnel config for secure websockets (wss://)
key = /etc/certs/server.key
cert = /etc/certs/server.crt
CApath = /etc/ssl/certs
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
setuid = stunnel4
setgid = stunnel4
pid = /var/run/stunnel4/websocket.pid
@Su-Shee
Su-Shee / geocouchosm
Last active December 28, 2015 12:34
adding geocouch to couchdb and add osm data
1) have the couchdb source available, geocouch needs some headerfiles
2) get and unpack the appropriate branch of geocouch suited for your couchdb version -
I have 1.3.0 so I got
https://github.com/couchbase/geocouch/tree/couchdb1.3.x
3) set environment:
export COUCH_SRC=/WHEREVER/apache-couchdb-1.3.0/src/couchdb/
@sarg
sarg / README.md
Last active May 24, 2024 05:33
rk30xx loader image unpacker

Obtaining RK3066 boot ROM.

Here are my steps.

At first, I took a look to RK30xxLoader(L)_V1.18.bin. This file appears in update.img for my device. So, I unpacked update.img using rk29Kitchen.

strings on that file returns nothing interesting, so I assumed the file is crypted

@brentertz
brentertz / emitter.js
Created October 20, 2012 16:30
Node.js: Extend a class to be an EventEmitter
var util = require('util'),
EventEmitter = require('events').EventEmitter;
var Server = function() {
var self = this;
this.on('custom_event', function() {
self.logSomething('custom_event');
});
@doublerebel
doublerebel / titanium-inspector.sh
Last active October 11, 2015 07:18
How to use Node-Inspector to Debug Titanium Mobile Applications
npm install -g node-inspector
/path/to/.titanium/mobilesdk/linux/3.1.0.GA/android/builder.py simulator projectname /path/to/android-sdk-linux /path/to/project com.your.project 16 WVGA800 127.0.0.1:5858
node-inspector
@feldmayer
feldmayer / gist:3370310
Created August 16, 2012 13:57
Drupal 7: Load block programmatically with i18n
<?php
$block_id = 2;
$block = block_block_view($block_id);
$block['content'] = i18n_string(array('blocks', 'block', $block_id, 'body'), $block['content']);
?>
@johnantoni
johnantoni / mysql.txt
Created August 7, 2012 18:57
mysql + vagrant + remote access
username: vagrant
password: vagrant
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev
sudo aptitude install mysql-server mysql-client
sudo nano /etc/mysql/my.cnf