Skip to content

Instantly share code, notes, and snippets.

View arvi's full-sized avatar
🎯
Focusing

arvi

🎯
Focusing
View GitHub Profile
/* EFFECT 1 */
.effect1
{
-webkit-box-shadow: 0 10px 6px -6px #777;
-moz-box-shadow: 0 10px 6px -6px #777;
box-shadow: 0 10px 6px -6px #777;
}
/* EFFECT 2 */
.effect2
@arvi
arvi / js-textarea-expand.js
Last active June 14, 2016 10:47
Textarea autoexpand
//autoexpand textarea when initial has input already
$(editBlock).find('textarea').each(function() {
var $this = $(this);
textCount = $this.val().length;
if(textCount > 25) {
rowBreaks = textCount / 25;
rowBreaks = Math.ceil(rowBreaks);
textareaName = $this.attr('name');
@arvi
arvi / deployUser.md
Created July 1, 2016 07:40 — forked from learncodeacademy/deployUser.md
Adding a deploy user in Linux

(wherever it says url.com, use your server's domain or IP)

Login to new server as root, then add a deploy user

sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deploy

And Update the new password

@arvi
arvi / flightplan-deploy.md
Created July 1, 2016 08:33 — forked from learncodeacademy/flightplan-deploy.md
Deploy Node.js Apps with Flightplan

##Setup your server (this would ideally be done with automated provisioning)

  • add a deploy user with password-less ssh see this gist
  • install forever npm install -g forever

##Install flightplan

  • npm install -g flightplan
  • in your project folder npm install flightplan --save-dev
  • create a flightplan.js file
@arvi
arvi / sublime-settings-user.json
Last active July 6, 2016 10:49
Sublime Settings
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/SublimeLinter/Agila Oceanic Next (SL).tmTheme",
"font_face": "Inconsolata",
"font_size": 12,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
],
@arvi
arvi / kurento-cheatsheet.md
Last active July 11, 2016 11:03
Kurento Development Cheatsheet

Start / Stop

sudo service kurento-media-server-6.0 start
sudo service kurento-media-server-6.0 stop

Run NodeJs tutorial app:

@arvi
arvi / server.js
Last active July 20, 2016 10:49
Quick node server spin-up
var fs = require("fs");
var host = "127.0.0.1";
var port = 3000;
var express = require("express");
var app = express();
app.use(express.static(__dirname + "/")); //use static files in ROOT/public folder
app.get("/", function(request, response){ //root dir
response.send("Hello There");
@arvi
arvi / sublime-ui-theme-font-face.js
Created August 5, 2016 02:18
Custom Sublime font face settings (tabs, labels, and sidebar)
//------------------------------------------------------------------------------
// THEME FONT FACE
//------------------------------------------------------------------------------
//Tabs
{
"class": "tab_label",
"font.face" : ""
},
//Labels
myApp.onPageInit('conversations-chat', function (page) {
var myMessages = myApp.messages('.messages', {
autoLayout: true //adds all required additional classes (like "message-pic", "message-with-avatar", "message-with-tail", etc)
});
//initialize message bar
var myMessagebar = myApp.messagebar('.messagebar');
var conversationStarted = false;
  • check if openssl is installed
which openssl
  • generate private key and certificate signing request
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
openssl rsa -passin pass:x -in server.pass.key -out server.key