Skip to content

Instantly share code, notes, and snippets.

(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)
@ikouchiha47
ikouchiha47 / app.js
Last active September 12, 2016 11:14
Socket.io ExpressJS chat rooms
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);
// 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=================== */
'use strict';
// Declare app level module which depends on views, and components
angular.module('myApp', [
'ngRoute',
'myAppServices',
'myAppControllers'
]).
config(['$routeProvider', function($routeProvider) {
$routeProvider.
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
jshint: {
src: ['app/**/*.js'],
options: {
eqeqeq: true,
curly: true,
laxcomma: true
}
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
(function() {
'use strict';
angular
.module('githubApp')
.factory('Pagination', Pagination)
function Pagination(){
return {
@ikouchiha47
ikouchiha47 / app.js
Last active October 24, 2015 21:53
live editor
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 == './')
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 );
@ikouchiha47
ikouchiha47 / Functional.c
Created July 9, 2015 03:23
Functional programming with c , integer types
#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 ) {