Skip to content

Instantly share code, notes, and snippets.

View timoa's full-sized avatar
🚀
Trying to contribute to opensource everyday!

Damien Laureaux timoa

🚀
Trying to contribute to opensource everyday!
View GitHub Profile
@timoa
timoa / custom_theme.xml
Created July 10, 2015 13:06
Titanium - Android Material Design
<!-- /platform/android/res/values/custom_theme.xml -->
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MyCustomTheme" parent="@style/Theme.AppCompat">
<item name="colorPrimary">#86569A</item>
<item name="colorAccent">#FFFFFF</item>
<item name="android:statusBarColor">#86569A</item>
<item name="android:navigationBarColor">#86569A</item>
</style>
</resources>
@timoa
timoa / var_dump.js
Created September 16, 2012 18:04
Similar "var_dump()" PHP function with Appcelerator Titanium Mobile (http://timoa.com/en/2012/07/appcelerator-dump-javascript-object-ti-api-debug/)
/**
* Debug : var_dump
*
* @var: Var
* @level: Level max
*
*/
function var_dump(_var, _level) {
var dumped_text = "";
if(!_level) _level = 0;
@timoa
timoa / tiApp.xml
Created September 16, 2012 18:06
Appcelerator Titanium Mobile: move Android application on SD card (http://timoa.com/en/2011/09/appcelerator-move-android-application-on-sd-card/)
<android xmlns:android="http://schemas.android.com/apk/res/android">
<tool-api-level>8</tool-api-level>
<manifest android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="7" />
</manifest>
</android>
// parsed from https://github.com/danielbruce/entypo/blob/master/config.yml
[
{
"name": "note",
"code": "0x266a",
"search": [
"music",
"note",
"song"
@timoa
timoa / .bash_profile
Last active December 31, 2015 19:58
Add Android SDK in PATH (Mac & Linux). Edit ~/.bash_profile
export PATH=${PATH}:~/Documents/SDK/android-sdk/tools
@timoa
timoa / strings.xml
Last active December 31, 2015 19:59
Add i18n support to Titanium Mobile app (/i18n/fr/strings.xml)
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="win1_title">Tab 1</string>
<string name="win1_text">Je suis la fenêtre 1</string>
<string name="win2_title">Tab 2</string>
<string name="win2_text">Je suis la fenêtre 2</string>
</resources>
@timoa
timoa / save_file.js
Created September 16, 2012 18:01
Save file iOS and Android with Appcelerator Titanium Mobile SDK (http://timoa.com/en/2012/07/appcelerator-nativepath-on-ios-and-android/)
// OS
if(Ti.Platform.osname === 'iPhone' || Ti.Platform.osname === 'iPad') {
var ios = true;
}
/**
* Save file function
*
* @file: Binary file (Blob)
* @filename: Name of file (String)
@timoa
timoa / 1. Install "code" in your PATH
Last active August 29, 2018 04:56
Export VisualStudio Code extensions list
https://code.visualstudio.com/docs/setup/mac
// ==UserScript==
// @name GitHub without signup
// @version 0.0.3
// @namespace https://gist.githubusercontent.com/timoa/
// @downloadURL https://gist.github.com/timoa/fb22f3ea14500c074e4d9570c9c5e1ad/raw/67d5bfe79a97f460ed20f8f278f1c73942f8f959/Github_without_signup.user.js
// @description Allows to browse a GitHub profiles without the signup box on top
// @author Timoa
// @include http*://github.com/*
// @license MIT
// ==/UserScript==