Skip to content

Instantly share code, notes, and snippets.

View ricardoalcocer's full-sized avatar
💭
making music at https://alcomusic.com

Alco ricardoalcocer

💭
making music at https://alcomusic.com
View GitHub Profile
@citruz
citruz / QEMU_ON_M1.md
Last active April 17, 2024 15:25
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@dreamsparkx
dreamsparkx / More-links.txt
Last active April 2, 2024 04:09
Install Apache, PHP, MySQL and phpMyAdmin on Mac OS X
@erdem
erdem / countries.json
Last active August 30, 2023 11:08
Country list as JSON format. fields: name, coordinates, timezones, country code and capital resource: https://github.com/mledoze/countries
[
{
"timezones": [
"America/Aruba"
],
"latlng": [
12.5,
-69.96666666
],
"name": "Aruba",
@chrisknepper
chrisknepper / gcal_link.php
Created July 18, 2014 03:51
PHP Google Calendar Link Generator
find-up() {
local path=$(pwd)
while [[ "$path" != "" && ! -e "$path/$1" ]]; do
path=${path%/*}
done
if [ "$path" != "" ]
then
echo "$path"
fi
}
@benbahrenburg
benbahrenburg / AddingFetchToSDK.md
Last active August 13, 2016 17:28
This gist outlines an approach for adding the fetch background mode to Titanium

This document details how to add the background mode of fetch into the Titanium SDK. It is important to note that once these updates are performed you will be able to attach a listener to be called when the fetch background mode is triggered.

After the below updates are made, you can clear your Titanium project and run this sample app.js to view how it works.

TiBase.h and TiBase.m updates

The first step in adding the fetch background mode is to create the const values that will later be used when adding or listening to notification center.

To do this first open the TiBase.h file and add the const of

@FokkeZB
FokkeZB / app.js
Created August 22, 2013 09:54
How to know if your Android device is LONG or NOTLONG?
http://developer.android.com/guide/topics/resources/providing-resources.html#ScreenAspectQualifier
if ((Ti.Platform.displayCaps.platformWidth / Ti.Platform.displayCaps.platformHeight) < (((Ti.Gesture.orientation === Ti.UI.LANDSCAPE_LEFT)) ? (320 / 240) : (240 / 320)))) {
Ti.API.info('I am LONG');
} else {
Ti.API.info('I am NOTLONG');
}
@tsteur
tsteur / alloy.jmk
Created July 15, 2013 22:12
Simple build configuration file for Titanium Mobile Alloy. It extends the destroy method of each controller to automatically remove all event listeners which are defined in the view (XML).
function readContentFromFile(file)
{
return require('fs').readFileSync(file).toString();
}
function writeContentToFile(file, content)
{
require('fs').writeFileSync(file, content);
}
@mauropm
mauropm / app.js
Created July 4, 2013 00:22
An example of generic app with different actions according to the button. It's showing how to manage the destruction of the window after you use it, and other nice things. To use: Create a new classic mobile project in Titanium Studio, and copy all this files to Resources directory. This is intended to work with Titanium Mobile SDK 3.1.1.GA, wit…
// INcluding memory management utils.
Ti.include('utils.js');
// root window.
var win = Ti.UI.createWindow({
backgroundColor:'white',
exitOnclose:true,
});
@viezel
viezel / app.js
Last active June 15, 2020 19:13
Codebird for Appcelerator Titanium. Using the Twitter API 1.1
// This is an example of use.
// Here we use the new Bearer Token thats make it possible to get tweets without user login
// More info on Bearer here: https://dev.twitter.com/docs/auth/application-only-auth
// Full Codebird API is here: https://github.com/mynetx/codebird-js
var Codebird = require("codebird");
var cb = new Codebird();
cb.setConsumerKey('CONSUMER_KEY', 'CONSUMER_SECRET_KEY');
var bearerToken = Ti.App.Properties.getString('TwitterBearerToken', null);