This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(package-initialize) | |
(add-to-list 'load-path "~/.emacs.d/elpa") | |
;;(add-to-list 'custom-theme-load-path "~/.emacs.d/themes") | |
(setq make-backup-files nil) | |
(setq auto-save-default nil) | |
(setq-default tab-width 2) | |
(setq-default indent-tabs-mode nil) | |
(setq inhibit-startup-message t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var http = require('http'); | |
var path = require('path'); | |
var logger = require('morgan'); | |
var cookieParser = require('cookie-parser'); | |
var bodyParser = require('body-parser'); | |
var app = express(); | |
var server = http.Server(app); | |
var io = require('socket.io')(server); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// getEvents() | |
// Keep a track of the events list for each element | |
// getListeners(event) | |
// Keep a track of the listener list for each event | |
/* ===================Handle adding of event=================== */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Declare app level module which depends on views, and components | |
angular.module('myApp', [ | |
'ngRoute', | |
'myAppServices', | |
'myAppControllers' | |
]). | |
config(['$routeProvider', function($routeProvider) { | |
$routeProvider. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function (grunt) { | |
grunt.initConfig({ | |
jshint: { | |
src: ['app/**/*.js'], | |
options: { | |
eqeqeq: true, | |
curly: true, | |
laxcomma: true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep drv /var/log/Xorg.0.log | |
/var/log/dmesg , glxinfo | grep -i direct , lspci -nnk | |
install lshw; | |
sudo lshw -html > MyHardware.html | |
mywiki.wooledge.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
angular | |
.module('githubApp') | |
.factory('Pagination', Pagination) | |
function Pagination(){ | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = require('http').createServer(handler), | |
io = require('socket.io').listen(app), | |
path = require('path'), | |
fs = require('fs'); | |
app.listen(9000); | |
function handler (req, res) { | |
var filePath = '.' + req.url; | |
if (filePath == './') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function $( selector ) { | |
if( typeof selector === "string" ) | |
return new dom(selector); | |
else if (selector instanceof Node) | |
return new dom(selector); | |
} | |
//thanks to AwalGarg | |
$.id = function( selector ) { | |
return $( '#' + selector ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
#define arrlen(x) (sizeof(x)/sizeof((x)[0])) | |
int callback( int i ) { | |
return i * 2; | |
} | |
int callback_filter( int i ) { |
OlderNewer