- Install LiveView globally:
npm i -g liveview- Change the
~/.titanium/config.jsonto include the CLI hook (underpaths->hook):
{
"user": { ... },
"app": { ... },
"cli": { ... },| blueprint: | |
| name: Sensor Light | |
| description: > | |
| # 💡 Sensor Light | |
| **Version: 8.5** | |
| Your lighting experience, your way - take control and customize it to perfection! 💡✨ |
| import SwiftUI | |
| enum PreviewProviderMode: CaseIterable { | |
| /// Use for a light appearance preview. | |
| case lightMode | |
| /// Use for a dark appearance preview. | |
| case darkMode | |
| // | |
| // FacebookReactions.swift | |
| // | |
| // Created by Fabio Giolito on 10/06/2019. | |
| // Follow me: https://twitter.com/fabiogiolito | |
| // | |
| import SwiftUI | |
| struct FacebookReactions : View { |
| [HttpPost] | |
| public IActionResult Post([FromBody]EventGridEvent[] value) | |
| { | |
| if (value == null || value.Length != 1 || value[0].Data == null) | |
| { | |
| _logger.LogError("Bad event."); | |
| return BadRequest(); | |
| } | |
| _logger.LogInformation($"Received event with type {value[0].EventType}"); |
| export function showOptions (args) { | |
| const title = args.title; | |
| const message = args.message; | |
| const options = args.options; | |
| const destructive = args.destructive !== undefined ? args.destructive : -1; | |
| let cancel = -1; | |
| return new Promise((resolve, reject) => { | |
| if (OS_IOS) { | |
| options.push('Cancel'); |
| export default class Utils { | |
| static loadCachedImageFromURL(url, cb) { | |
| let filename; | |
| try { | |
| filename = url.substring(url.lastIndexOf('/') + 1); | |
| } catch (err) { | |
| cb(null); | |
| } |
| # drop this into your ./.gitconfig file | |
| # usage | |
| # $ git today | |
| # $ git yesterday | |
| # $ git since 18-11-01 | |
| # | |
| # will display a list of formatted commits you can lift to use for release notes | |
| [alias] | |
| today = log --since=1am --pretty=format:"%C(blue)-\\ %s" |
npm i -g liveview~/.titanium/config.json to include the CLI hook (under paths -> hook):{
"user": { ... },
"app": { ... },
"cli": { ... },| var win = Ti.UI.createWindow({ | |
| backgroundColor: '#fff' | |
| }); | |
| var btn = Ti.UI.createButton({ | |
| title: 'Schedule Notification' | |
| }); | |
| btn.addEventListener('click', function() { | |
| schedule('id_1', 'New Notification', 'Hey there!', new Date().getTime() + 3000); |