Skip to content

Instantly share code, notes, and snippets.

View olamedia's full-sized avatar
:octocat:
Working from home

olamedia olamedia

:octocat:
Working from home
  • Russian Federation
View GitHub Profile
@olamedia
olamedia / icu-config
Created October 20, 2020 03:25 — forked from jasny/icu-config
ICU 66.1 for Ubuntu 20.04
#!/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.
#******************************************************************************
@olamedia
olamedia / axios-catch-error.js
Created September 22, 2020 22:47 — forked from fgilio/axios-catch-error.js
Catch request errors with Axios
/*
* 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 😨
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);
// 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;
@olamedia
olamedia / rAF.js
Created July 12, 2012 09:11 — forked from paulirish/rAF.js
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller
// fixes from Paul Irish and Tino Zijdel
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {
$.event.special.textchange = {
@olamedia
olamedia / LICENSE.txt
Created May 28, 2011 18:11 — forked from jed/LICENSE.txt
generate random UUIDs
Copyright (c) 2011 Jed Schmidt, http://jed.is
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions: