Skip to content

Instantly share code, notes, and snippets.

View tejasrsuthar's full-sized avatar
🏠
Working from home

Tejas Suthar tejasrsuthar

🏠
Working from home
  • Mobiquity Inc.
  • Ahmedabad
  • 15:35 (UTC -12:00)
View GitHub Profile
@tejasrsuthar
tejasrsuthar / List.md
Created September 20, 2016 11:20 — forked from msurguy/List.md
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@tejasrsuthar
tejasrsuthar / .travis.yml
Created May 15, 2017 07:20
Travis Build configuration file for NodeJS
language: node_js
node_js:
- "iojs"
- "7"
@tejasrsuthar
tejasrsuthar / package.json
Last active May 15, 2017 07:24
Travis Build Test Defination
{
"name": "myTravisBuildTest",
"description": "Your Travis-CI check for JSHint (Code Linting)",
"author": "Tejas Suthar",
"version": "0.0.1",
"devDependencies": {
"jshint": "^2.6.0"
},
"scripts": {
"test": "./node_modules/jshint/bin/jshint travistesting.js"
@tejasrsuthar
tejasrsuthar / nodeUploader.js
Last active September 4, 2023 18:38
Node JS File Upload with Formidable Module
// Include Main HTTP module
var http = require('http');
// Include Formidable libarary for Upload Processing
var formidable = require('formidable');
// Include file system module
var fs = require('fs');
@tejasrsuthar
tejasrsuthar / hTranscoder.js
Last active May 23, 2017 06:24
📹 Video encoding / transcoding / converting with node.js - Awesomeness
// Load handbrake library for transcoding
var transcoder = require('handbrake-js');
transcoder.spawn({ input: 'spiderman.avi', output: 'spiderman.mkv' })
.on('error', function(err){
if(err)
throw err
// Invalid user input data, no video data found
@tejasrsuthar
tejasrsuthar / webpack.config.js
Created June 13, 2017 06:01
Sample Webpack configuration
"use strict";
var webpack = require("webpack");
var path = require("path");
module.exports = {
cache: true,
entry: path.join(__dirname, "src/index.js"),
externals: [
{
@tejasrsuthar
tejasrsuthar / FirebaseShareData
Created June 17, 2017 06:15
How to structure Firebase data and rules for sharing data between users
Since the user decides who'd they like to share the list with, I'd store that information in the user data itself. For example:
{
"rules": {
"$userPath": {
".write": "$userPath == 'acc_' + auth.id",
".read": "$userPath == 'acc_' + auth.id || root.child($userPath).child('shared').hasChild(auth.id)"
}
}
}
@tejasrsuthar
tejasrsuthar / handlebars-usage.js
Last active June 23, 2017 12:28
NodeJS server with handlebars usage
// Credit: http://code.runnable.com/U07z_Y_j9rZk1tTx/handlebars-template-examples-with-express-4-for-node-js
var express = require('express');
var app = express();
var expressHbs = require('express3-handlebars');
app.engine('hbs', expressHbs({extname:'hbs', defaultLayout:'main.hbs'}));
app.set('view engine', 'hbs');
app.get('/', function(req, res){
@tejasrsuthar
tejasrsuthar / Git push deployment in 7 easy steps.md
Created July 17, 2017 06:36 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@tejasrsuthar
tejasrsuthar / vscode-settings.json
Created July 18, 2017 11:20
Visual studio code settings
// Place your settings in this file to overwrite the default settings
{
"editor.fontSize": 15,
"editor.fontFamily": "Consolas",
"editor.tabSize": 2,
"editor.wordWrapColumn": 80,
"editor.fontLigatures": true,
"editor.snippetSuggestions": "top",
"editor.minimap.enabled": true,
"files.exclude": {