Skip to content

Instantly share code, notes, and snippets.

@tzmartin
tzmartin / ios.settings.schemes.md
Created January 13, 2016 18:27
iOS Settings URL Scheme List

Settings URL schemes:

Note: < i=OS 5.1 use prefs:. > 5.1 use app-settings:

  • app-settings:root=General&path=About
  • app-settings:root=General&path=ACCESSIBILITY
  • app-settings:root=AIRPLANE_MODE
  • app-settings:root=General&path=AUTOLOCK
  • app-settings:root=General&path=USAGE/CELLULAR_USAGE
  • app-settings:root=Brightness
@falkolab
falkolab / fixmenu.js
Last active February 14, 2016 19:50
Fix for not displayed ActionBar menu in Titanium SDK
// Not rendered menu fix
// Author: Andrey Tkachenko, falkolab
// Source: https://gist.github.com/falkolab/29ab007f4981f1d747f2
exports.fix = function(win) {
if (win.activity) {
win.addEventListener('open', function fixMenu(evt) {
evt.source.removeEventListener(evt.type, fixMenu);
var activity = evt.source.activity;
if (activity.onCreateOptionsMenu) {
activity.onCreateOptionsMenu = _.partial(function(func, e) {
@manumaticx
manumaticx / README.md
Last active July 11, 2020 14:07
Fading ActionBar in Titanium

Fading Actionbar

This is a quick example of how to create a fading actionbar effect like this in Appcelerator Titanium

fadingactionbar

How this works

This is actually very simple. The trick is putting the Actionbar in overlay mode by configuring the theme with windowActionBarOverlay:true. Then all you need to do is updating the color of the Actionbar, in this case by scrolling a ScrollView.

@adamwathan
adamwathan / v-cloak.md
Last active February 26, 2023 14:26
Useful CSS utilities for Vue.js cloaking

Handy helpers for controlling visibility of elements until Vue has compiled.

Use like:

<div v-cloak>
  <h1>
    <span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
    <span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
 
@euforic
euforic / app.js
Last active March 15, 2017 14:27
Node.js Libraries for all Titanium platforms | Available Modules [ net, stream (node 9.x version), assert, buffer, util, events ] Still a work in progress
/**
* Available node core libraries
*/
var node = require('node')
, assert = node.assert
, buffer = node.buffer
, events = node.events
, net = node.net
, stream = node.stream
@deanet
deanet / google.sh
Created August 22, 2012 16:09
Uploading File into Google Drive (because grive too many dependencies qt, xorg ? )
#!/bin/bash
## uploading to google
## rev: 22 Aug 2012 16:07
det=`date +%F`
browser="Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1"
username="user@domain-apps.com"
password="password"
accountype="HOSTED" #gooApps = HOSTED , gmail=GOOGLE
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 23, 2024 15:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@christopherscott
christopherscott / ExcelToJsDate.js
Created May 24, 2012 16:40
Convert Excel date values to JavaScript date objects
// Convert Excel dates into JS date objects
//
// @param excelDate {Number}
// @return {Date}
function getJsDateFromExcel(excelDate) {
// JavaScript dates can be constructed by passing milliseconds
// since the Unix epoch (January 1, 1970) example: new Date(12312512312);
@slevithan
slevithan / xregexp-lookbehind2.js
Created April 14, 2012 21:06
Simulating lookbehind in JavaScript (take 2)
// Simulating infinite-length leading lookbehind in JavaScript. Uses XRegExp.
// Captures within lookbehind are not included in match results. Lazy
// repetition in lookbehind may lead to unexpected results.
(function (XRegExp) {
function prepareLb(lb) {
// Allow mode modifier before lookbehind
var parts = /^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*)\)$/.exec(lb);
return {