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
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
# /etc/init/node.conf | |
description 'node.js app production' | |
author 'ivarprudnikov.com' | |
env NAME=app-name | |
env ENV=production | |
env PORT=8080 | |
env LOG_FILE=/var/log/app-name.log | |
env USER=ubuntu | |
env NPM_BIN=/usr/bin/npm | |
env APP_LOCATION=/var/www/thisismyapp |
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/bash | |
#chkconfig: 2345 95 20 | |
#description: iptables rules to prevent communication on unused ports. | |
IPT=/sbin/iptables | |
#Reset all rules (F) and chains (X), necessary if have already defined iptables rules | |
$IPT -F | |
#Start by blocking all traffic, this will allow secured, fine grained filtering |
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/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 | |
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
# /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 |
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 name="layout" content="main"/> | |
<title>Homepage</title> | |
</head> | |
<body> | |
<g:formRemote dojoType="dijit.form.Form" method="post" | |
onLoading="myFunction()" id="submitForm" update="resultset" |
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
def isLocalhost(String ip) { | |
def localIps = [] | |
def networkInterfaces | |
try { | |
networkInterfaces = NetworkInterface.getNetworkInterfaces() | |
networkInterfaces = networkInterfaces?.toList() | |
} catch(SocketException e) { | |
} |
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
(function(undefined, angular, Hammer, $){ | |
"use strict"; | |
angular.module('com.ivarprudnikov.ng.youtube',['LocalStorageModule']) | |
.config(['localStorageServiceProvider', function(localStorageServiceProvider){ | |
localStorageServiceProvider.setPrefix('yt_prefs'); | |
}]); | |
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
// 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/ | |
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
#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 |
OlderNewer