Skip to content

Instantly share code, notes, and snippets.

View neophyt3's full-sized avatar
🎯
Focusing

Pradeep Chauhan neophyt3

🎯
Focusing
  • Mumbai, India
View GitHub Profile
@neophyt3
neophyt3 / gist:921b326ff2dded2e02600c14e143e47f
Created March 20, 2017 16:36 — forked from dbrugne/gist:2a62d4dd88f11fa36b75
MongoDB bulk insert from mongoose models
var mongoose = require('mongoose');
var hitSchema = mongoose.Schema({
text: String,
music: String
});
hitSchema.statics.bulkInsert = function(models, fn) {
if (!models || !models.length)
return fn(null);
@neophyt3
neophyt3 / sql-mongo_comparison.md
Created March 19, 2017 19:34 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@neophyt3
neophyt3 / mongodb.md
Created March 19, 2017 19:31
#mongodb cheat sheet

MongoDB cheat sheet

Overview

Overview

MongoDB is a document database that provides high performance, high availability, and easy scalability.

  • Document Database
@neophyt3
neophyt3 / README.md
Created January 22, 2017 13:07 — forked from magnetikonline/README.md
Nginx FastCGI cache configuration example.

Nginx FastCGI cache

Example /etc/nginx/nginx.conf using FastCGI (e.g. to PHP-FPM) with FastCGI cache enabled. This will capture returned data and persist it to a disk based cache store for a configurable amount of time, great for robust full page caching.

Will need to create a directory to hold cache files, for the example given here that would be:

$ sudo mkdir -p /var/cache/nginxfastcgi
$ chown www-data: /var/cache/nginxfastcgi
@neophyt3
neophyt3 / installing.md
Created January 22, 2017 12:23 — forked from githubjeka/installing.md
How install PHP 5.6.0, Nginx, php-fpm on Debian

#Download Sorce PHP

mkdir /opt/php-5.6.0
mkdir /usr/local/src/php5-build
cd /usr/local/src/php5-build
wget http://de.php.net/get/php-5.6.0.tar.bz2/from/this/mirror -O php-5.6.0.tar.bz2
tar jxf php-5.6.0.tar.bz2
cd php-5.6.0/
@neophyt3
neophyt3 / ps-aux.sh
Created January 12, 2017 21:13
Linux Top Command
#!/bin/sh
#Src: https://www.linode.com/docs/databases/mysql/tuning-your-mysql-database
echo [PID] [MEM] [PATH] && ps aux | awk '{print $2, $4, $11}' | sort -k2rn | head -n 20
ps -eo pcpu,pid,user,args | sort -k 1 -r | head -20
@neophyt3
neophyt3 / building-static-nginx.txt
Created December 28, 2016 20:15 — forked from rjeczalik/building-static-nginx.txt
Notes on building nginx as a static binary.
# Building static nginx for teh lulz
#
# basic dependencies
sudo apt-get install libxslt1-dev libxml2-dev zlib1g-dev libpcre3-dev libbz2-dev libssl-dev
# download nginx and openssl
wget http://nginx.org/download/nginx-1.5.6.tar.gz
tar xf nginx-1.5.6.tar.gz; cd nginx-1.5.6
@neophyt3
neophyt3 / ngrxintro.md
Created July 31, 2016 18:25 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

#Comprehensive Introduction to @ngrx/store By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

FFMPEG Tutorial
http://dranger.com/ffmpeg/end.html
@neophyt3
neophyt3 / .gitignore
Created April 26, 2016 17:18 — forked from christianchristensen/.gitignore
Simple PHP Graph data-structure.
/vendor