Skip to content

Instantly share code, notes, and snippets.

Esfand esfand

Block or report user

Report or block esfand

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@esfand
esfand / booting.md
Created Feb 6, 2014
OS Booting Process
View booting.md

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 Aug 29, 2015
JSON-LD Concept
View sample.html
<!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">
View index.cfm
<html>
<head>
<link href="index.css" rel="stylesheet" />
</head>
<body>
<cfquery
name="statesQuery"
datasource="census"
View nodestreamuse.adoc

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

View gulpfile.js
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);
View gulpfile.js
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);
View gulpfile.js
'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())
View gist:9072113
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({
@esfand
esfand / angularboot.adoc
Last active Aug 29, 2015
Using Bootstrap and Angular Together
View angularboot.adoc

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:

You can’t perform that action at this time.