background preloader

SSH tricks

SSH tricks
Why SSH? As recently as a 2001, it was not uncommon to log in to a remote Unix system using telnet. Telnet is just above netcat in protocol sophistication, which means that passwords were sent in the clear. As wifi proliferated, telnet went from security nuissance to security disaster. As an undergrad, I remember running ethereal (now wireshark) in the school commons area, snagging about a dozen root passwords in an hour. SSH, which encrypts and authenticates connections, had been in development since 1995, but it seemed to become adopted nearly universally and almost overnight around 2002. It is worth configuring SSH properly: per-user configuration is in ~/.ssh/config; system-wide client configuration is in /etc/ssh/ssh_config. Key-based, passwordless authentication Key-based passwordless authentication makes it less cumbersome for other programs and scripts to piggyback atop SSH, since you won't have to re-enter your password each time. To set this up, first log in to the client machine.

Backbone patterns Building apps with Backbone.js Here, I try to document the good practices that our team has learned along the way building Backbone applications. This document assumes that you already have some knowledge of Backbone.js, jQuery, and of course, JavaScript itself. Table of contents Thanks Standalone lexers with lex: synopsis, examples, and pitfalls The tool lex in a nutshell The program lex consumes a lexical specification and generates C source code for a lexical analyzer. Typically, regular expressions describe classes of tokens in a spec. [See my post on sculpting text for a definition of regular expressions.] For example, an informal lexical specification might be: identifiers match [A-Za-z_][A-Za-z_0-9]*; integers match -? In ordinary usage, lex generates a file that can be linked in with the rest of the compiler/interpreter toolchain. To communicate with downstream phases, the C code that lex generates exports the procedure yylex: when a downstream phase needs the next token, it calls yylex(). Alternatively, the generated C program can be made standalone, in which case it dumps the result of its lexical analysis into a file or to standard out. (In choosing a format to dump, it helps to pick one with widespread parsing library support, such as XML or S-Expressions.) Using (f)lex As such, this article covers flex. $ flex file.l name regex

Table of Contents - Mixu's Node book - Mixu's Node book Sculpting text with regex, grep, sed and awk Theory: Regular languages Many tools for searching and sculpting text rely on a pattern language known as regular expressions. The theory of regular languages underpins regular expressions. (Caveat: Some modern "regular" expression systems can describe irregular languages, which is why the term "regex" is preferred for these systems.) Regular languages are a class of formal language equivalent in power to those recognized by deterministic finite automata (DFAs) and nondeterministic finite automata (NFAs). [See my post on converting regular expressions to NFAs.] In formal language theory, a language is a set of strings. For example, {"foo"} and {"foo", "foobar"} are formal (if small) languages. (Mathematicians don't typically put quotes around a string, preferring to let the fixed-width typewriter font distinguish it as one, but I'm guessing that programmers are more comfortable with the quotes around strings.) In regular language theory, there are two atomic languages: Useful grep flags The +? #!

git - the simple guide - no deep shit! git - the simple guide just a simple guide for getting started with git. no deep shit ;) by Roger Dudler credits to @tfnico, @fhd and Namics this guide in deutsch, español, français, indonesian, italiano, nederlands, polski, português, русский, türkçe, မြန်မာ, 日本語, 中文, 한국어 Vietnamese please report issues on github Infuse analytics everywhere with the AI-powered embedded analytics platform. setup Download git for OSX Download git for Windows Download git for Linux create a new repository create a new directory, open it and perform a git init to create a new git repository. checkout a repository create a working copy of a local repository by running the command git clone /path/to/repository when using a remote server, your command will be git clone username@host:/path/to/repository workflow add & commit You can propose changes (add it to the Index) using git add <filename> git add * This is the first step in the basic git workflow. pushing changes branching update & merge tagging log useful hints guides

Relational shell programming Representing relations In mathematics, a relation is a set of tuples. [A tuple is an ordered collection of values, (v_1,\ldots,v_n).] For example, \{({\tt Bob}, 31), ({\tt Judy}, 32)\} is a relation. In database theory, a relation is a set of tuples with an assigned name for each column; that is, a relation is a table. For the earlier relation, we could define a header tuple ({\tt name}, {\tt age}) that names each column. We could then represent the relation explicitly as a table: Relational algebra is a theory for manipulating relations whose power is equivalent to SQL and relational calculus. Remarkably, relational algebra has only six primitive operations. I define the six primitives below, but if you're looking for a comprehensive work on relational theory, particularly as it relates to modern databases, I recommend Date's SQL and Relational Theory Relations in Unix Many Unix commands interpret files like relations: each line is a tuple. The command traceroute produces relation-like data: Union

Backbone Fundamentals – A Free Work-In-Progress Book For Developers Of All Levels About a week ago, I began working on a new article about Backbone.js. It was due to cover some concepts and insights intermediate or advanced users might appreciate, but I found myself wanting to reference topics beginners might need to know if they wanted to get the most out it. Quite a few of them. In the end, I decided it might make more sense to just write a book on Backbone instead. If you'd like to check it out, you can find the work-in-progress book on GitHub :) Why write a book? Now, there's a plethora of (great) posts about Backbone out there I could have just linked to – many of which are well written and respected, but I began to think about my own journey of learning how to use the framework. Beginners articles about Backbone typically don't mention intermediate or advanced concepts by their very nature. Backbone Fundamentals Backbone Fundamentals hopes to change that. Interested in helping out? Contributing Please tell me if I'm wrong about something. What's next? Thanks!.

Persistent USB Required Tools and Preparation USB Thumbdrive (Minimum 8GB, Recommended 16GB) Backtrack 5 ISO file, md5sum verified or a bootable BT5 DVD Vmware to boot the iso if you choose to perform all the steps from within a VM as I did It makes no difference which way you choose, just be aware that drive designations may be different for you than they were for me. This may not be the best way to do this, but it works. I am sure there is a more elegant way of doing this which I may revisit later if the need arises and time allows. Partitioning Display the available drives with the command below and determine which drive you wish to install to. dmesg | egrep hd. The target drive needs to be partitioned as follows: The first partition needs to be a primary partition of no more than 3.5 GB and set to type vfat (I have made this partition larger than needed so as it covers all iso's and future versions). Run the following commands to perform the partitioning. fdisk /dev/sdb Create the first Partition

30 free programming eBooks - citizen428.blog() Since this post got quite popular I decided to incorporate some of the excellent suggestions posted in the comments, so this list now has more than 50 books in it. BTW: I’m not very strict on the definition of “ebook”, some of them are really just HTML versions of books. [UPDATED: 2012-01-18] Learning a new programming language always is fun and there are many great books legally available for free online. Here’s a selection of 30 of them: Lisp/Scheme:Common Lisp: A Gentle Introduction to Symbolic ComputationHow to Design ProgramsInterpreting Lisp (PDF, suggested by Gary Knott)Let Over LambdaOn LispPractical Common LispProgramming in Emacs LispProgramming Languages. Ruby:The Bastards Book of Ruby (suggested by Dan Nguyen)Clever Algorithms (suggested by Tales Arvelos)Data Structures and Algorithms with Object-Oriented Design Patterns in RubyLearn Ruby the Hard WayLearn to ProgramMacRuby: The Definitive GuideMr. Erlang:Concurrent Programming in ErlangLearn You Some Erlang for Great Good

The Hacker Way I don't normally comment on the day's news, but I want to make an exception today to share something from Facebook's S-1 filing. Over the next few days, astronomical amounts of attention are going to be paid to Facebook's incredible business results: the 800+ million active users, the $3.7 billion (!) in revenue, and their growth rates, too. Simply put: we don’t build services to make money; we make money to build better services.And we think this is a good way to build something. The true test of corporate pronouncements and mission statements is not whether they sound good, but rather whether they reflect a real commitment. After about a week of coding, Zuckerberg launched thefacebook.com last Wednesday afternoon. Here's to the Zuck I admire, the one that had the courage to launch a simple, useful app in a week, celebrate his first 900 customers, and - for eight straight years - insist on iterating, executing, and building for the long-term.

Related: