Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
export default function openInTab({url}) { | |
let instance = window.open('about:blank'); | |
if (url.indexOf('http') !== 0) { | |
url = `http://${url}`; | |
} | |
let meta = `<meta http-equiv="refresh" content="0;url=${url}">`; | |
instance.document.write(meta); | |
instance.document.close(); | |
return false; | |
} |
before npm i: | |
install openssl: `brew install openssl` | |
export CPPFLAGS=-I/usr/local/opt/openssl/include | |
export LDFLAGS=-L/usr/local/opt/openssl/lib |
const _ = require('lodash'); | |
function orderObjectFields(input) { | |
if (!input) { | |
return input; | |
} | |
if (_.isString(input)) { | |
return input; | |
} else if (_.isArray(input)) { |
const validEncodings = [ | |
'US-ASCII', 'iso-ir-6', 'ANSI_X3.4-1968', 'ANSI_X3.4-1986', 'ISO_646.irv:1991', 'ISO646-US', 'us', 'IBM367', 'cp367', | |
'csASCII', 'ISO-8859-1', 'ISO_8859-1:1987', 'iso-ir-100', 'ISO_8859-1', 'latin1', 'l1', 'IBM819', 'CP819', | |
'csISOLatin1', 'ISO-8859-2', 'ISO_8859-2:1987', 'iso-ir-101', 'ISO_8859-2', 'latin2', 'l2', 'csISOLatin2', | |
'ISO-8859-3', 'ISO_8859-3:1988', 'iso-ir-109', 'ISO_8859-3', 'latin3', 'l3', 'csISOLatin3', 'ISO-8859-4', | |
'ISO_8859-4:1988', 'iso-ir-110', 'ISO_8859-4', 'latin4', 'l4', 'csISOLatin4', 'ISO-8859-5', 'ISO_8859-5:1988', | |
'iso-ir-144', 'ISO_8859-5', 'cyrillic', 'csISOLatinCyrillic', 'ISO-8859-6', 'ISO_8859-6:1987', 'iso-ir-127', | |
'ISO_8859-6', 'ECMA-114', 'ASMO-708', 'arabic', 'csISOLatinArabic', 'ISO-8859-7', 'ISO_8859-7:1987', 'iso-ir-126', | |
'ISO_8859-7', 'ELOT_928', 'ECMA-118', 'greek', 'greek8', 'csISOLatinGreek', 'ISO-8859-8', 'ISO_8859-8:1988', |
/* | |
Sample usage: | |
runCron({promise: screenshotsCache, intervalNumber: 5, intervalString: 'minutes'}); | |
This will call "screenshotsCache" Promise every 5 minutes. | |
If promise resolves after 6 minutes, it will be called again immediately because 5 mins already passed. | |
*/ |
(function (global) { | |
let SCORE_NO_MATCH = 0.0; | |
let SCORE_MATCH = 1.0; | |
let SCORE_TRAILING = 0.8; | |
let SCORE_TRAILING_BUT_STARTED = 0.9; | |
let SCORE_BUFFER = 0.85; | |
let WORD_SEPARATORS = ' \t_-'; | |
let LiquidMetal = { | |
lastScore: null, |
var WooCommerceAPI = require('woocommerce-api'); | |
var WooCommerce = new WooCommerceAPI({ | |
url: 'https://xxxx.lt', | |
consumerKey: 'xxxxx', | |
consumerSecret: 'xxxxx', | |
wpAPI: true, | |
version: 'wc/v1' | |
}); | |
function helper({timeout, id, value, data}) { |
let levenshtein = function (str1, str2) { | |
let current = [], prev, value; | |
for (let i = 0; i <= str2.length; i++) | |
for (let j = 0; j <= str1.length; j++) { | |
if (i && j) | |
if (str1.charAt(j - 1) === str2.charAt(i - 1)) | |
value = prev; | |
else | |
value = Math.min(current[j], current[j - 1], prev) + 1; |
#! /bin/bash | |
sudo apt-get update | |
sudo apt-get install g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev -y | |
git clone https://github.com/nghttp2/nghttp2.git && cd nghttp2 | |
autoreconf -i | |
automake | |
autoconf | |
./configure --enable-apps | |
make |