Skip to content

Instantly share code, notes, and snippets.

@esfand
esfand / booting.md
Created February 6, 2014 23:41
OS Booting Process

Booting Process

Source: http://ubuntuforums.org/showthread.php?t=1806831

Some explanation on the booting proces and what is mounting etc...

When you press the power button, than the BIOS loads. The BIOS is fixed on your mother board. As a last step, the BIOS looks at the first record of the first (or only) harddisk. That record is called the mbr (master boot record).

The computer starts executing what is on the mbr.

@esfand
esfand / json-ld.adoc
Last active August 29, 2015 13:56
JSON-LD Concept
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://twitter.github.com/bootstrap/assets/js/bootstrap.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<style type="text/css">
@esfand
esfand / index.cfm
Created February 13, 2014 16:44 — forked from triceam/index.cfm
<html>
<head>
<link href="index.css" rel="stylesheet" />
</head>
<body>
<cfquery
name="statesQuery"
datasource="census"

Examples of the Node.js Streams API

Node brought a simplicity and beauty to streaming. Streams are now a powerful way to build modules and applications. Yet the original streams API had some problems. So in Node v0.10, we saw the streams API change in order to fix the prior problems, extend the APIs to encapsulate more common use cases, and be simpler and easier to use.

As I tried to make the adjustment to the new APIs, I found some documentation on it but not many

var gulp = require('gulp');
var gutil = require('gulp-util');
var express = require('express');
var path = require('path');
var tinylr = require('tiny-lr');
var createServers = function(port, lrport) {
var lr = tinylr();
lr.listen(lrport, function() {
gutil.log('LR Listening on', lrport);
'use strict';
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var imagemin = require('gulp-imagemin');
var Server = require('.');
gulp.task('scripts', function () {
return gulp.src(['client/js/**/*.js', '!client/js/vendor/**'])
.pipe(uglify())
var gulp = require('gulp');
var gutil = require('gulp-util');
var sass = require('gulp-sass');
var lr = require('tiny-lr');
var http = require('http');
var path = require('path');
var ecstatic = require('ecstatic');
var tlr = lr();
var livereload = function (evt, filepath) {
tlr.changed({
var gulp = require('gulp');
var gutil = require('gulp-util');
var express = require('express');
var path = require('path');
var tinylr = require('tiny-lr');
var createServers = function(port, lrport) {
var lr = tinylr();
lr.listen(lrport, function() {
gutil.log('LR Listening on', lrport);
@esfand
esfand / angularboot.adoc
Last active August 29, 2015 13:56
Using Bootstrap and Angular Together

Using Bootstrap and Angular Together

I ran into a couple of issues when using the Bootstrap 3 Navbar component in an AngularJS application, namely: * The navbar doesn’t collapse automatically when the route / location is changed (applies to 'mobile' view only) * The active menu item isn’t tracked correctly, it just stays the same when the location is changed Here’s how to fix them:

In the HTML

Find this line: