This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
# FEM | |
page = "http://nptel.iitm.ac.in/video.php?subjectId=112106135" | |
download = "http://npteldownloads.iitm.ac.in/softlinks_mp4/112106135/lec%02d.mp4" |
This file contains hidden or 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 <string.h> | |
#include <stdlib.h> //realloc() | |
#include <unistd.h> //fork(), pipe() | |
#include <limits.h> //PATH_MAX | |
//#include <sys/stat.h> | |
//#include <sys/types.h> | |
#include <fcntl.h> //access mode constants, and flags for open() | |
#include <errno.h> //errno | |
#include <readline/readline.h> |
This file contains hidden or 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 <string.h> | |
int main() | |
{ | |
/* read the number of test cases */ | |
int ncases; | |
scanf("%d", &ncases); | |
int i; |
This file contains hidden or 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 ` for prefix | |
set -g prefix ` | |
# number windows from 1 | |
set -g base-index 1 | |
# highlight the active window | |
setw -g window-status-current-bg colour0 | |
set -g set-titles on |
This file contains hidden or 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
#!/bin/sh | |
# Remove stray debugger statements from the modified files before committing | |
# get a list of added, modified, copied files | |
files=`git diff --cached --name-only --diff-filter=ACM` | |
# remove debugger lines | |
# | |
# 1. remove any line containing a debugger |
This file contains hidden or 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
Section "ServerLayout" | |
Identifier "X.org Configured" | |
Screen 0 "Screen0" 0 0 | |
InputDevice "Mouse0" "CorePointer" | |
InputDevice "Keyboard0" "CoreKeyboard" | |
InputDevice "touchpad" "AlwaysCore" | |
EndSection | |
Section "Files" | |
ModulePath "/usr/lib/xorg/modules" |
This file contains hidden or 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
require "rubygems" | |
require "xml" | |
#add a list of namespaces to the node | |
#the namespaces formal parameter is a hash | |
#with "prefix" and "prefix_uri" as | |
#key, value pairs | |
#prefix for the default namespace is "default" | |
def add_namespaces( node, namespaces ) | |
#pass nil as the prefix to create a default node |
This file contains hidden or 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
Node # 1 | |
Name: nex:nexml | |
Prefix: nex | |
Local: nexml | |
Depth: 0 | |
Attribute # 1 | |
Name: xmlns:xsi | |
Prefix: xmlns | |
Local: xsi | |
Depth: 1 |
This file contains hidden or 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
require "rubygems" | |
require "xml" | |
#parse the sample.xml ignoring whitespaces and | |
#performing entity substitution. | |
doc = XML::Reader.file("sample.xml", :options => XML::Parser::Options::NOBLANKS | | |
XML::Parser::Options::NOENT | |
) | |
#display a node's name: local and prefix |
This file contains hidden or 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
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<nex:nexml | |
version="0.8" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.nexml.org/1.0 ../xsd/nexml.xsd" | |
xmlns:nex="http://www.nexml.org/1.0" | |
generator="mesquite" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
xmlns="http://www.nexml.org/1.0"> | |
<otus |