Skip to content

Instantly share code, notes, and snippets.

View mateeyow's full-sized avatar
🌍

Matthew Torres mateeyow

🌍
View GitHub Profile
/* To add more icons just copy these three lines */
.icon-tomato,
.icon-left-tomato:before,
.icon-right-tomato:after{
background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/131442/tomato.svg);
}
@mateeyow
mateeyow / INSTALLING-NODE.md
Last active December 5, 2016 06:51
Installing a better command line tool, and Installing NodeJs on Windows

Installing NodeJs on your Windows Workspace

Install Babun (not necessary but highly recommended)

Babun is an excellent replacement for your cmd; git is also pre-installed.

To install Babun on different directory:

  • Download from this site
  • Exctract the downloaded ZIP file
  • Open cmd
  • Change to the directory of the exctracted ZIP file by doing: cd {{directory_of_the_file}}
@mateeyow
mateeyow / ajax-onleave.js
Last active August 29, 2015 14:22
Send ajax request when someone leaves the page
(function () {
"use strict";
// Do something with the response data
// Since the visitor will leave the page we don't need this
/**
onResponse = function () {
if (httpRequest.readyState == 4) {
if (httpRequest.status === 200) {
// Do something with httpRequest.responseText
# Load balancer configuration
upstream exampleApp {
# Directs to the process with least number of connections.
least_conn;
# One failed response will take a server out of circulation for 20 seconds.
server 127.0.0.1:10080 fail_timeout=20s;
#server 127.0.0.1:10081 fail_timeout=20s;
#server 127.0.0.1:10082 fail_timeout=20s;
#server 127.0.0.1:10083 fail_timeout=20s;
@mateeyow
mateeyow / nginx.conf
Last active August 29, 2015 14:17 — forked from turtlesoupy/nginx.conf
http {
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 6;