This is typescript and hook implemented version of @epeli s example https://gist.github.com/epeli/10c77c1710dd137a1335#file-webviewautoheight-js
I hope it will be useful for you
cheers!
var list = readHugeList(); | |
var nextListItem = function() { | |
var item = list.pop(); | |
if (item) { | |
// process the list item... | |
nextListItem(); | |
} | |
}; |
console.log(sum(2,3)); // Outputs 5 | |
console.log(sum(2)(3)); // Outputs 5 |
console.log(0.1 + 0.2); | |
console.log(0.1 + 0.2 == 0.3); |
(function(){ | |
var a = b = 3; | |
})(); | |
console.log("a defined? " + (typeof a !== 'undefined')); | |
console.log("b defined? " + (typeof b !== 'undefined')); |
const dns = require('dns'); | |
const mailcheck = require('mailcheck'); | |
const isDomainMXValid = (domain) => { | |
return new Promise((resolve, reject) => { | |
dns.resolveMx(domain, (err, mxs) => { | |
if (err) { | |
reject(err); | |
} | |
resolve(!!(mxs && mxs.length > 0 && mxs[0].exchange)); |
export const makeReq = (url: string | undefined, data = '', headers: any = {}, timeout = 5000): Promise<string> => { | |
if (!url) { | |
throw 'url must be defined!'; | |
} | |
const contentLength = Buffer.byteLength(data, 'utf-8'); | |
headers['Content-Length'] = contentLength; | |
headers['Content-Type'] = 'text/xml; charset=utf-8'; | |
headers['Connection'] = 'keep-alive'; |
This is typescript and hook implemented version of @epeli s example https://gist.github.com/epeli/10c77c1710dd137a1335#file-webviewautoheight-js
I hope it will be useful for you
cheers!
''' | |
Rename subtitle files in same folder to match the movie file | |
(for xbmc-share folder) | |
Jarkko Saltiola 2013 | |
''' | |
import os | |
import re | |
video_types = ["mkv","avi"] |
#!/bin/bash -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
#!/bin/bash | |
NOW=$(date +"%Y-%m-%d-%H%M") | |
DB_USER="dbuser" | |
DB_PASS="dbpass" | |
DB_NAME="database_name" | |
DB_HOST="127.0.0.1" | |
TREE_FILE="$NOW.tar.gz" |