This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The following snippet will ask the user to rate your app the second time they launch it. | |
* It lets the user rate it now, "Remind Me Later" or never rate the app. | |
*/ | |
var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); | |
win.addEventListener('open', checkReminderToRate); | |
win.add(Ti.UI.createLabel({ text: 'This is a simple app that will remind you to rate it.' })); | |
win.open(); | |
function checkReminderToRate() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
function getJadeFiles(srcdir, destdir, wildcard) { | |
var path = require('path'); | |
var files = {}; | |
grunt.file.expand({cwd: srcdir}, wildcard).forEach(function(relpath) { | |
files[path.join(destdir, relpath.replace('.jade','.xml'))] = path.join(srcdir, relpath); | |
}); | |
return files; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Titanium.App.addEventListener("playvideo", function (e) { | |
win11 = Titanium.UI.createWindow({ | |
orientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT], | |
title: "Video", | |
zIndex: 222222 | |
}); | |
var activeMovie = Titanium.Media.createVideoPlayer({ | |
fullscreen: !0, | |
autoplay: !0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set master UI background color | |
Ti.UI.backgroundColor = '#000'; | |
// Set vars | |
var winMain, | |
vwWebMain, | |
lblValue, | |
vwBtn; | |
// Set global event listener as Firebase callback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var RaspiCam = require("raspicam"); | |
var moment = require('moment'); | |
var timestring = moment().format('YYYY-MM-DD HH.MM.SS'); | |
var camera = new RaspiCam({ | |
mode: 'photo', | |
output: timestring+'.jpg' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gpio = require("gpio"); | |
var RaspiCam = require("raspicam"); | |
var moment = require('moment'); | |
var camera = new RaspiCam({ | |
mode: 'photo', | |
output: timestring+'.jpg' | |
}); | |
camera.on("started", function(){ | |
console.log('started'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://meyerweb.com/eric/tools/css/reset/ | |
* v2.0 | 20110126 | |
* License: none (public domain) */ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, | |
b, u, i, center, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var querystr = 'o'; | |
var result = 'Hello World'; | |
var reg = new RegExp(querystr, 'gi'); | |
var final_str = result.replace(reg, function(str) { | |
return '<strong>' + str + '</strong>'; | |
}); | |
// final_str = 'Hell<strong>o</strong> W<strong>o</strong>rld' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// TextComposerViewApp | |
// | |
// Created by Yi-Hsiu Lee on 2022/9/14. | |
// | |
import ComposableArchitecture | |
import SwiftUI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Determine the shell being used | |
if [ -n "$ZSH_VERSION" ]; then | |
CONFIG_FILE=~/.zshrc | |
elif [ -n "$BASH_VERSION" ]; then | |
CONFIG_FILE=~/.bash_profile | |
else | |
echo "Unsupported shell." | |
exit 1 | |
fi |
OlderNewer