This file contains 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
<!-- | |
- Add a 'Text' widget with the content below (set 'mode' to 'html'). | |
- Make sure to enable JS parsing for this widget by setting the 'disable_sanitize_html' property to 'true' in your grafana.ini. | |
- For more detailed info, check out fi. https://www.worldometers.info/coronavirus/ | |
- STAY SAFE FOLKS! | |
--> | |
<center> | |
<div style="font-size: 20px">🦠<span id="confirmed"/></div> | |
<div style="font-size: 16px">💀<span id="deaths" /><span id="deathrate" style="color: #555; padding-left: 8px"/></div> |
This file contains 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
<Page xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:kt="nativescript-keyboard-toolbar"> | |
<!-- This GridLayout wrapper is required; it wraps the visible layout and the Toolbar layout(s) --> | |
<GridLayout> | |
<StackLayout> | |
<Label text="Some text"/> | |
<!-- Add an 'id' property that we can reference below --> | |
<TextField id="priceTextField" hint="Enter the price" keyboardType="number"/> | |
</StackLayout> |
This file contains 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
/* | |
Add this to your <activity>, so any link (clicked in fi. an e-mail) | |
will open your app instead of the website, but only if it matches these whitelisted path patterns | |
*/ | |
<activity android:launchMode="singleInstance"><!-- set the launchMode property to this value! --> | |
<intent-filter> | |
<action android:name="android.intent.action.VIEW"/> | |
<category android:name="android.intent.category.DEFAULT"/> | |
<category android:name="android.intent.category.BROWSABLE"/> |
This file contains 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
function processInbox() { | |
var threads = GmailApp.search("is:unread in:inbox has:nouserlabels from:[email protected] newer_than:1h"); | |
for (var i = 0; i < threads.length; i++) { | |
var messages = threads[i].getMessages(); | |
for (var j = 0; j < messages.length; j++) { | |
processMessage(messages[j]); | |
} | |
} |
This file contains 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
export class ComponentWithRadListView { | |
// assuming you have something like this in your view: | |
// <RadListView (loaded)="onOrderListLoaded($event)"> | |
onOrderListLoaded(args): void { | |
const listViewElement = <RadListView>args.object; | |
const tk: any = listViewElement.ios; | |
if (tk && tk.pullToRefreshView) { | |
tk.pullToRefreshView.activityIndicator.color = new Color("#4CC55B").ios; |
This file contains 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
// base64 encoder (btoa) / decoder (atob) which you can use in your NativeScript app. | |
// | |
// Usage (assuming you're in some component and this file is in the same folder: | |
// | |
// require('./base64'); | |
// | |
// const username = "My Usernamé"; | |
// usernameBase64Encoded = btoa(username); | |
This file contains 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
import { ad } from "tns-core-modules/utils/utils"; | |
import { isIOS } from "tns-core-modules/platform"; | |
let is24HourFormat: boolean; | |
if (isIOS) { | |
// solution from https://stackoverflow.com/a/12236693/2596974 | |
const dateFormat: string = NSDateFormatter.dateFormatFromTemplateOptionsLocale("j", 0, NSLocale.currentLocale); | |
is24HourFormat = dateFormat.indexOf("a") === -1; | |
} else { | |
// https://developer.android.com/reference/android/text/format/DateFormat.html#is24HourFormat(android.content.Context) |
This file contains 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
import { Component, OnInit } from "@angular/core"; | |
import { DeviceType } from "ui/enums"; | |
import { device } from "platform"; | |
import { Page } from "ui/page"; | |
@Component({ | |
moduleId: module.id, | |
selector: "my-component", | |
templateUrl: "my-component.html", | |
styleUrls: ["my-component.css"] |
This file contains 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
import { NgModule } from "@angular/core"; | |
import { DeviceType } from "ui/enums"; | |
import { device } from "platform"; | |
import * as application from "application"; | |
const fs = require("file-system"); | |
@NgModule({ | |
// .. | |
}) |
This file contains 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
/* my-component.css */ | |
Label.text { | |
font-size: 15; | |
} | |
/* my-component.tablet.css */ | |
.tablet Label.text { | |
font-size: 19; | |
} |
NewerOlder