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
export function defaultComparator<T>(a: T, b: T): i32 { | |
return (<i32>(a > b)) - (<i32>(a < b)); | |
} | |
export function createDefaultComparator<T>(): (a: T, b: T) => i32 { | |
return (a: T, b: T): i32 => (<i32>(a > b)) - (<i32>(a < b)); | |
} | |
export function isSorted<T>(data: Array<T>, comparator: (a: T, b: T) => i32 = createDefaultComparator<i32>()): bool { | |
for (let i: i32 = 1, len: i32 = data.length; i < len; i++) { |
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
const charset = '0123456789abcdef'.split(''); | |
const randomset = new Uint8Array(16); | |
export function uuid() { | |
let rand = 0; | |
for (let i = 0; i < 16; i++) { | |
if (rand < 2) { | |
rand += Math.random() * (1 << 24); | |
} | |
randomset[i] = rand & 0xFF; |
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
- https://www.campaignmonitor.com/css/ | |
- https://kb.mailchimp.com/templates/code/common-html-mistakes | |
- http://litmus.com/email-testing |
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
[ | |
{ | |
type: "button" | |
icon: "social-buffer" | |
callback: "application:add-project-folder" | |
tooltip: "Add Project" | |
iconset: "ion" | |
style: { | |
color: "rgba(255, 255, 255, 0.7)" | |
transform: "scale(1.2)" |
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
<!-- | |
SVG Filters supports by all browsers: | |
http://caniuse.com/#search=SVG%20filters | |
Advantages: | |
- Performance (CSS) Filters usually has GPU acceleration | |
- Support transpatent areas | |
Disantages: | |
- Hasn't inset shadows and Spread Radius |
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
// 1. Generate new private RSA Key: | |
// openssl req -newkey rsa:2048 -new -nodes -keyout key.pem -out csr.pem | |
// 2. Derivate public RSA Key from private: | |
// openssl rsa -in key.pem -out public_key.pem -outform PEM -pubout | |
const crypto = require('crypto'); | |
const fs = require('fs'); | |
const hashes = crypto.getHashes(); |
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
private static extern(Android) string GetUUID() | |
@{ | |
//android.app.Activity context = com.fuse.Activity.getRootActivity(); | |
//return android.provider.Settings.Secure.getString(context.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); | |
final android.app.Activity context = com.fuse.Activity.getRootActivity(); | |
final TelephonyManager tm = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE); | |
final String deviceId = "" + tm.getDeviceId(); | |
final String serialNum = "" + tm.getSimSerialNumber(); | |
final String androidId = "" + android.provider.Settings.Secure.getString( | |
context.getContentResolver(), |
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
#!/bin/sh | |
# | |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# |
NewerOlder