In this tutorial we're going to build a set of parser combinators.
We'll answer the above question in 2 steps
- what is a parser?
- and.. what is a parser combinator?
So first question: What is parser?
| #! /usr/local/bin/perl | |
| ### To install Perl SNMP Module: perl -MCPAN -e shell ; "install SNMP" | |
| use strict; | |
| use warnings; | |
| use Net::SNMP; | |
| my $OID_sysUpTime = '1.3.6.1.2.1.1.3.0'; | |
| my ($session, $error) = Net::SNMP->session( | |
| -hostname => shift || 'localhost', |
| var range = window.getSelection().getRangeAt(0), | |
| content = range.extractContents(), | |
| span = document.createElement('SPAN'); | |
| span.appendChild(content); | |
| var htmlContent = span.innerHTML; | |
| range.insertNode(span); | |
| alert(htmlContent); |
| var selection = window.getSelection(); | |
| var range = selection.getRangeAt(0); | |
| var newNode = document.createElement("span"); | |
| newNode.setAttribute("style", "background-color: pink;"); | |
| range.surroundContents(newNode); |
| # Get-ChildItem -Directory -Recurse -EA 0 | Get-FolderSize | sort size -Descending | |
| Function Get-FolderSize | |
| { | |
| BEGIN{$fso = New-Object -comobject Scripting.FileSystemObject} | |
| PROCESS{ | |
| $path = $input.fullname |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
| <title> - jsFiddle demo</title> | |
| <script type='text/javascript' src='//code.jquery.com/jquery-1.9.1.js'></script> | |
| git commit --date="`date -v-3m +%Y-%m-%d`" -am "Initial commit since the past 3 months" |
| #vi /etc/fstab | |
| LABEL=DRIVE_NAME none ntfs rw,auto,nobrowse |
| sudo visudo | |
| sudo update-alternatives --config editor | |
| ALL ALL = (ALL) NOPASSWD: ALL |