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
#!/bin/sh | |
## -*-sh-*- | |
#set -x | |
# BEGIN of icu-config-top | |
# Copyright (C) 2016 and later: Unicode, Inc. and others. | |
# License & terms of use: http://www.unicode.org/copyright.html | |
#****************************************************************************** | |
# Copyright (C) 1999-2013, International Business Machines | |
# Corporation and others. All Rights Reserved. | |
#****************************************************************************** |
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
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |
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
<template> | |
<div> | |
<SortableTable :columns="columnsToShow" :items="items" itemKey="company_id"> | |
<template slot="col-photo-cell" slot-scope="{ item: { image } }"> | |
<td class="col-photo"><Avatar v-if="image" :src="image['60x60']" size="60px" rounded>{{ image.id }}</Avatar></td> | |
</template> | |
<template slot="col-name" slot-scope="{ item, item: { full_name, type } }"> | |
<div class="user-row__name">{{ full_name }}</div> | |
<div class="user-row__role">{{ formatCompanyType(type) }}</div> | |
<div class="user-row__role">{{ item.warehouses }}</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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script> | |
function blockingClick(){ | |
console.log('blocking promise'); | |
(new Promise((resolve, reject) => { | |
let i = 0; |
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 const {scan, isPrime, primes} = (() => { | |
let primes: number[] = [2]; | |
let cursor = 2; | |
const chunkSize = 100; | |
const isPrimeAgainstKnown: (number: number) => boolean = number => primes.reduce((result, prime) => { | |
return result && (number % prime !== 0) | |
}, true) | |
async function nextPrime(limit: number): Promise<number|null>{ |
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
const PassThrough = require('stream').PassThrough; | |
class duplexLayer{ | |
constructor(connection) { | |
//super(options); | |
var self = this; | |
self.connection = connection; | |
// Downstream |
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
var audioSource = "",videoSource = ""; | |
function gotSources(sourceInfos) { | |
for (var i = 0; i !== sourceInfos.length; ++i) { | |
var sourceInfo = sourceInfos[i]; | |
//var option = document.createElement('option'); | |
//option.value = sourceInfo.id; | |
if (sourceInfo.kind === 'audio') { | |
//option.text = sourceInfo.label || 'microphone ' + (audioSelect.length + 1); | |
audioSource = sourceInfo.id; | |
console.log("mic:"+sourceInfo.id); |
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
// Underhanded skullduggery to access the keystore daemon. | |
// | |
// This is merely a slightly cleaned up implementation of | |
// http://nelenkov.blogspot.com/2012/05/storing-application-secrets-in-androids.html | |
// and all credit to Nikolay for digging into this. | |
package org.kbsriram.android.util; | |
import android.content.Context; | |
import android.content.Intent; |
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
<project name="GraphicsCore" default="all"> | |
<property name="jar.name" value="graphicsCore.jar" /> | |
<property name="modloader.basedir" value="/home/olamedia/Документы/__OlaCraft/workspace/ola-modloader" /> | |
<property name="modloader.srcdir" value="${modloader.basedir}/src" /> | |
<property name="modloader.coremodsdir" value="${modloader.basedir}/coremods" /> | |
<property name="jogl.classpath" value="/home/olamedia/Документы/__OlaCraft/LIBRARIES/jogl-jogamp/gluegen_614-joal_380-jogl_869-jocl_713/" /> | |
<target name="all" description="Do the entire build" depends="run"> | |
</target> | |
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
<?php | |
function whois_query($domain) { | |
// fix the domain name: | |
$domain = strtolower(trim($domain)); | |
$domain = preg_replace('/^http:\/\//i', '', $domain); | |
$domain = preg_replace('/^www\./i', '', $domain); | |
$domain = explode('/', $domain); | |
$domain = trim($domain[0]); |
NewerOlder