Skip to content

Instantly share code, notes, and snippets.

View exrobbie's full-sized avatar

explorer exrobbie

View GitHub Profile
@s4y
s4y / gist:1215700
Created September 14, 2011 02:12
child_process.execFile example
var child_process = require('child_process');
// exec: spawns a shell.
child_process.exec('ls -lah /tmp', function(error, stdout, stderr){
console.log(stdout);
});
// execFile: executes a file with the specified arguments
child_process.execFile('ls', ['-lah', '/tmp'], function(error, stdout, stderr){
console.log(stdout);
@esfand
esfand / angular-jqlite.adoc
Last active April 19, 2023 01:32
Angular jqLite

Angular jqLite

jQuery and Angular

Angular doesn’t depend on jQuery. In fact, the Angular source contains an embedded lightweight alternative: jqLite. Still, when Angular detects the presence of a jQuery version in your page, it uses that full jQuery implementation in lieu of jqLite. One direct way in which this manifests itself is with Angular’s element abstraction. For example, in a directive you get access to the element that the directive applies to:

@soheilhy
soheilhy / nginxproxy.md
Last active March 22, 2024 08:54
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers