Skip to content

Instantly share code, notes, and snippets.

View erikusaj's full-sized avatar

Erik Ušaj erikusaj

  • Ljubljana, Slovenia
View GitHub Profile
@erikusaj
erikusaj / XPression_StaticMap.vbs
Created October 18, 2012 07:59
Ross XPression script to generate a Map of your location from Google static maps API
'
' Ross XPression script to generate a Map of your location from Google static maps API
'
' Requires:
' Text1 object on scene as input for your location
' Quad1 object on scene to apply the texture
'
' System requirements:
' Ross XPression, connection to internet, MSXML2, ADODB and FSO available
'
@erikusaj
erikusaj / ljse-pre-formatting
Created February 13, 2013 08:36
LJSE stock ticker pre-formatting With PowerShell
$file = "ljse.txt"
$namefix = @(("NALOZBE", "NALOŽBE"), ("PORTOROZ","PORTOROŽ"), ("LASKO","LAŠKO"), ("CATEZ","ČATEŽ"), ("ZITO", "ŽITO"))
$ft = "{2}"
$eq = "{14}l{2}"
$lt = "{15}î{2}"
$gt = "{16}ì{2}"
Try
{
// random pastels with alfa for use on STB
var pastels =
["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"];
function hexToRgb(hex) {
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
hex = hex.replace(shorthandRegex, function(m, r, g, b) {
return r + r + g + g + b + b;
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/iconsets/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../paper-radio-group/paper-radio-group.html">
<link rel="import" href="../paper-radio-button/paper-radio-button.html">
<link rel="import" href="../paper-slider/paper-slider.html">
@erikusaj
erikusaj / M202_final.md
Last active December 9, 2015 02:23
M202_final.md

Final: Question 1: Distributed vs. Co-Located Replica Sets

For the following problem, you would like to use a 3-member replica set, and are considering the following deployment options:

Option 1:

All 3 servers are co-located in a data center in New York Option 2:

The primary is located in New York

@erikusaj
erikusaj / nexus7_flo_nougat.md
Last active June 18, 2017 19:12
nexus7_flo_nougat

putting stuff together as didn't work at first... (read: forums threads are not always good to follow. Don't panic if somethign doesn't work as expected)

Here's how reset the device, straight from the Google mouth:

  1. Turn off the Nexus.
  2. Press and hold Volume Down and then press and hold Power until the tablet turns on. ...
  3. Press Volume Down twice to highlight Recovery Mode. ...
  4. Hold down the Power button and press and release the Volume Up button once.

downloads: Recovery Clockwork Touch

@erikusaj
erikusaj / mac_tips_tricks.md
Created November 25, 2017 16:23
Mac tips & tricks

xcode-select --install xcode-select: note: install requested for command line developer tools

#!/bin/bash
# push apk to Android device, try to find launchable activity
# if this fails use monkey
if [ "$1" == "" ]; then
echo -e "Missing parameter: apk file"
else
echo -e "Please wait, while (re-)installing APK to device... \n"
adb install -r $1
echo -e "Finding what can be launched ... \n"
#!/bin/bash
if [ "$1" != "" ]; then
ipaddress=$1;
echo -e "Bluetooth HCI logging on STB $ipaddress ... \n"
# cleanup
rm bluetooth_manager_*
rm bluetooth_hci_*
adb connect $ipaddress