Skip to content

Instantly share code, notes, and snippets.

View ivarprudnikov's full-sized avatar
🌍
Vivamus, moriendum est.

Ivar (aɪvɑr) ivarprudnikov

🌍
Vivamus, moriendum est.
View GitHub Profile
@ivarprudnikov
ivarprudnikov / deploy-node-to-elastic-beanstalk.sh
Last active August 19, 2022 19:49
Script to deploy node to elastic beanstalk
#!/bin/bash
# boto is missing dependency when using AWS tools to push to eb
# http://stackoverflow.com/questions/23365374/aws-aws-push-importerror-no-module-named-boto-in-ubuntu
sudo pip install boto
rm -rf eb_deployment
mkdir -p eb_deployment
cd eb_deployment
@ivarprudnikov
ivarprudnikov / structure
Last active August 29, 2015 14:15
ESA1 interactive PD model {field key} - {field value}, {class}
|--5-1 - , type=org.apache.pdfbox.pdmodel.interactive.form.PDTextbox
|--4-5 - , type=org.apache.pdfbox.pdmodel.interactive.form.PDTextbox
|--6-1 - , type=org.apache.pdfbox.pdmodel.interactive.form.PDTextbox
|--6-2 - , type=org.apache.pdfbox.pdmodel.interactive.form.PDTextbox
|--6-3 - , type=org.apache.pdfbox.pdmodel.interactive.form.PDTextbox
|--6-5 - , type=org.apache.pdfbox.pdmodel.interactive.form.PDTextbox
|--6-9 - , type=org.apache.pdfbox.pdmodel.interactive.form.PDTextbox
|--6-10 - , type=org.apache.pdfbox.pdmodel.interactive.form.PDTextbox
|--6-11 - , type=org.apache.pdfbox.pdmodel.interactive.form.PDTextbox
|--6-12 - , type=org.apache.pdfbox.pdmodel.interactive.form.PDTextbox
@ivarprudnikov
ivarprudnikov / README.md
Last active August 29, 2015 14:15
OSX Mongodb setup

Mongodb on Mac OSX

Download/setup mongodb

  • curl -O http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.6.7.tgz
  • cd /usr/share
  • sudo mkdir mongodb
  • chown -Rv {username} mongodb
  • cd mongodb
  • tar -zxvf ~/Downloads/mongodb-osx-x86_64-2.6.7.tgz
@ivarprudnikov
ivarprudnikov / gist:76d2fbd6b1015720fba8
Created February 10, 2015 21:50
Arduino Uno + Adafruit SSD1306 - etch a sketch
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
// If using software SPI (the default case):
#define OLED_MOSI 9 // data
#define OLED_CLK 10
#define OLED_DC 11
#define OLED_CS 12
@ivarprudnikov
ivarprudnikov / gist:ae2bbaaae80aa60a1eb2
Created October 10, 2014 00:01
Streaming MxPEG from Mobotix IP camera via VLC
// hepful links
https://wiki.videolan.org/MxPEG/
http://stackoverflow.com/questions/1735933/streaming-via-rtsp-or-rtp-in-html5
http://en.wikipedia.org/wiki/Internet_media_type
http://www.videolan.org/doc/videolan-howto/en/ch09.html
http://www.videolan.org/doc/streaming-howto/en/ch03.html
http://www.mobotix.com/eng_GB/Support/User-Forum/Applications/Putting-Mobotix-live-video-stream-on-a-Web-site-How-To
http://www.linuxquestions.org/questions/linux-desktop-74/how-to-stream-a-webcam-to-http-with-vlc-929319/
(function(undefined, angular, Hammer, $){
"use strict";
angular.module('com.ivarprudnikov.ng.youtube',['LocalStorageModule'])
.config(['localStorageServiceProvider', function(localStorageServiceProvider){
localStorageServiceProvider.setPrefix('yt_prefs');
}]);
@ivarprudnikov
ivarprudnikov / IsRemoteLocalhost
Created July 16, 2013 11:00
Grails check if remote is localhost
def isLocalhost(String ip) {
def localIps = []
def networkInterfaces
try {
networkInterfaces = NetworkInterface.getNetworkInterfaces()
networkInterfaces = networkInterfaces?.toList()
} catch(SocketException e) {
}
@ivarprudnikov
ivarprudnikov / gist:5899280
Created July 1, 2013 08:35
Example of grails form remote and onLoading event
<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="main"/>
<title>Homepage</title>
</head>
<body>
<g:formRemote dojoType="dijit.form.Form" method="post"
onLoading="myFunction()" id="submitForm" update="resultset"
@ivarprudnikov
ivarprudnikov / debug.conf
Created March 8, 2013 00:29
upstart script for debugging events
# /etc/init/debug.conf
start on ( starting JOB!=debug \
or started JOB!=debug \
or stopping JOB!=debug \
or stopped JOB!=debug )
script
exec 1>>/tmp/upstart_debug_log.file
echo -n "$UPSTART_JOB/$UPSTART_INSTANCE ($0):$$:`date`:"
echo "Job $JOB/$INSTANCE $UPSTART_EVENTS. Environment was:"
env
@ivarprudnikov
ivarprudnikov / aws_ubuntu_ami_user_data.sh
Created March 8, 2013 00:25
AWS Ubuntu ami user data to init instance. Installs node.js, creates upstart script and runs it.
#!/bin/bash
# install node.js
apt-add-repository -y ppa:chris-lea/node.js
apt-get update
apt-get install -y python-software-properties nodejs npm git make g++
# install girror (https://github.com/eladb/node-girror)
npm install -g girror