Skip to content

Instantly share code, notes, and snippets.

View drola's full-sized avatar

Matjaž Drolc drola

View GitHub Profile
@drola
drola / How_to_Angular2_WebGL.md
Last active September 23, 2017 20:27
How_to_Angular2_WebGL.md

How to use Angular with WebGL

If you haven't already, install Angular CLI:

npm install -g @angular/cli

Use Angular CLI to create a minimal Angular app:

@drola
drola / upgrade_docker_on_zesty.sh
Last active May 23, 2017 10:30
Upgrades docker.io package with docker-ce package from Docker repository
#!/bin/bash
sudo apt-get remove --yes docker.io
sudo /bin/bash -c 'echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty edge" > /etc/apt/sources.list.d/docker.list'
sudo apt update
sudo apt install --yes docker-ce
#!/bin/bash
# Install git cmake build-essential python2.7 nodejs default-jre
sudo apt-get install git cmake build-essential python2.7 nodejs default-jre
wget https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
tar -zxvf emsdk-portable.tar.gz
cd ./emsdk-portable
./emsdk update
./emsdk install sdk-incoming-64bit #If you are getting "collect2: error: ld returned 1 exit status" error, try running ./emsdk install -j1 sdk-incoming-64bit
./emsdk activate sdk-incoming-64bit

CI

Continuously merging developer branches into a common one.

Continuous delivery

Any code commit may be released to customers at any moment. Works well with Scrum project managements. At the end of sprint code goes into production.

@drola
drola / err.md
Last active April 29, 2016 08:48

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at OfficeOpenXml.Drawing.ExcelDrawing.GetPixelHeight () <0x41fcfc10 + 0x0009b> in :0 at OfficeOpenXml.Drawing.ExcelDrawing.GetPositionSize () <0x41fcd540 + 0x00037> in :0 at OfficeOpenXml.Drawing.ExcelDrawing+ExcelPosition.set_Row (Int32 value) <0x41fcd3f0 + 0x00046> in :0 at OfficeOpenXml.Drawing.ExcelDrawing..ctor (OfficeOpenXml.Drawing.ExcelDrawings drawings, System.Xml.XmlNode node, System.String nameXPath) <0x41fccbe0 + 0x002a3> in :0 at OfficeOpenXml.Drawing.Chart.ExcelChart..ctor (OfficeOpenXml.Drawing.ExcelDrawings drawings, System.Xml.XmlNode node, System.Uri uriChart, OfficeOpenXml.Packaging.ZipPackagePart part, System.Xml.XmlDocument chartXml, System.Xml.XmlNode chartNode) <0x41fcc950 + 0x0011f> in :0 at OfficeOpenXml.Drawing.Chart.ExcelScatterChart..ctor (OfficeOpenXml.Drawing.ExcelDrawing

#!/bin/bash
#Repositiories
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo add-apt-repository ppa:webupd8team/java
#sudo add-apt-repository ppa:chris-lea/node.js
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
sudo sh -c 'echo "deb http://deb.opera.com/opera/ stable non-free" >> /etc/apt/sources.list.d/opera.list'
@drola
drola / gist:13ea1ae4397fce7e40f7
Created March 7, 2015 17:26
Identify apache user
APACHE_USER=$(ps axho user,comm|grep -E "httpd|apache"|uniq|grep -v "root"|awk 'END {if ($1) print $1}')
@drola
drola / bootstrap_trusty.sh
Last active August 29, 2015 13:58
Ubuntu Trusty Tahr dev bootstrap
#!/bin/bash
#Repositiories
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo add-apt-repository ppa:webupd8team/java
sudo add-apt-repository ppa:chris-lea/node.js
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
sudo sh -c 'echo "deb http://deb.opera.com/opera/ stable non-free" >> /etc/apt/sources.list.d/opera.list'
sudo add-apt-repository ppa:reviczky/context-daily
sudo apt-get update
sudo apt-get install context texworks kbibtex
#Copy this to ~/.bashrc or ~/.profile
export OSFONTDIR=~/.fonts:/usr/share/fonts:/usr/share/texmf/fonts/opentype/:/opt/libreoffice/basis3.3/share/fonts/
mtxrun --script fonts --reload
mtxrun --script fonts --list --all --pattern=*
context --reload
@drola
drola / ajax-form.js
Last active December 23, 2015 11:28 — forked from havvg/ajax-form.js
jQuery(function($) {
$(document).on('submit', 'form[data-async]', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),