Skip to content

Instantly share code, notes, and snippets.

View Topener's full-sized avatar
👊
Working on Open Source & Public Digital Good DHIS2

Rene Pot Topener

👊
Working on Open Source & Public Digital Good DHIS2
View GitHub Profile
@ewanharris
ewanharris / check-module.sh
Last active January 11, 2021 08:55
Script to check Titanium modules for references to UIWebView
#!/usr/bin/env bash
FOLDER=$1
echo "Checking $FOLDER"
# Check for references to UIWebView in the build .a files using strings
for file in "$FOLDER"/*.a; do
strings "$file" | grep UIWeb > /dev/null 2>&1
if [ $? -eq 0 ]
@AymaneHrouch
AymaneHrouch / autosub_reddit.js
Last active April 20, 2024 19:11
Auto subscribe to a lot of subreddits after you move to a new account.
/*
-Visit https://old.reddit.com/subreddits/ using your old account
-Copy link address of "multireddit of your subscriptions"
It will give you a link address like this: https://old.reddit.com/r/[subreddit1+subreddit2...+subredditN]
Please note that if you have a lot of subreddits the link won't work because there's a limit to the link's length, you can simply split it to two or three links
-Visit that link (or links) using your new account.
-Open the console by pressing F12 and then clicking the console tab
-Past the code bellow and press enter. You're welcome :)
*/
const sub = () => {
@clemblanco
clemblanco / anystyle.tss
Created September 4, 2015 11:43
Titanium - Alloy Framework - Defining an using a theme.
```javascript
"#button": {
// ...
backgroundColor: Alloy.CFG.design.mainColor,
// ...
}
```
@FokkeZB
FokkeZB / .bash_profile
Created October 3, 2014 13:47
Alias for making screenshots from connected Android device/emulator
alias screenshot='adb shell screencap -p | perl -pe "s/\x0D\x0A/\x0A/g" > "/Users/fokkezb/Downloads/android_$(date +%Y%m%d-%H%M%S).png"'
# NOTE: Replace 'fokkezb' with your user. You cannot use ~ when using $() unfortunately
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 17, 2024 02:53
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jonrmitchell
jonrmitchell / crossPlatformTabbedBar.js
Last active July 1, 2018 12:41
Titanium Module. Android doesn't have a tabbedBar like iOS does, so this was my attempt at duplicating the functionality and API http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.UI.ButtonBar
/**
* Android doesn't have a tabbedBar like iOS does, so this was my attempt at duplicating the functionality and API
* http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.UI.ButtonBar
* @param {Dictionary<Titanium.UI.Button>} params
*/
function createTabbedBar(params) {
if (!params.labels || params.labels.length === 0) {
throw "You must specify button titles in a 'labels' member on the passed in object";
}