background preloader

Vi Cheat Sheet

Vi Cheat Sheet
Related:  Web 3

Wiimote This article will go through the basic steps required to have a working Wiimote in Linux for general use. It will not go into much detail for some steps as there are many guides already written for some parts already. Note: The approach shown on this page is based on software which is no longer developed upstream. There is a new effort on creating a Wii Remote driver based on the new Linux kernel Wii Remote driver. See XWiimote if you want to test the new Wii Remote software stack. Prerequisites Bluetooth cwiid Wiimote The most important piece required is Bluetooth, this must already be configured and running without the help of this guide. Connect the Wiimote First you need to make sure to load the uinput module: $ sudo modprobe uinput You should have a device in /dev/uinput now. Thanks to cwiid you can scan for your Wiimote now: (press the 1 and 2 buttons on your Wiimote) $ hcitool scan Scanning ... Input Device The Wiimote can act as a regular input device like a mouse using wminput. 1. 2.

CGI Tutorial: Forms Usually the information supplied by the QUERY_STRING variable should come from the user pressing buttons and entering text in the HTML document. It is this information we would like to package up and send to the CGI script. Each group of buttons and text boxes is called a form, and forms are enclosed between the HTML tags <form> ... </form>. <form action=" method="GET"> Some text in here. The action tag is the URL of the CGI script. Submit buttons A submit button is the input device that actually calls the URL. The result is a form which looks like this. If you click the submit button then the URL will be called. Checkboxes A checkbox is a simple on/off button. The result of this code is the following form Now if the submit button is clicked when the box is checked then the information lights=on is packaged into QUERY_STRING. Here is example HTML code for a form with two checkboxes and a message for each. Radio buttons Text boxes Exercise

Stack Overflow: Helping One Million Developers Exit Vim This morning, a popular Stack Overflow question hit a major milestone: You’re not alone, jclancy. In the five years since this question was asked, there have been over a million other developers who got stuck in Vim and couldn’t escape without a bit of help. Indeed, the difficulty of quitting the Vim editor is a common joke among developers. I’ve been told by experienced Vim users that this reputation is unfair, and I’m sure they’re right (even I’ve gotten the hang of it in the last few years). In honor of this milestone, we decided to take a look at the data surrounding this question. How many people have been struggling to exit Vim? In the last year, How to exit the Vim editor has made up about .005% of question traffic: that is, one out of every 20,000 visits to Stack Overflow questions. Has the percentage of traffic it makes up changed over time? It doesn’t look like it. Differences across countries What kind of programmers get stuck in Vim? Conclusion

Beat Detection Algorithms This document is to be distributed for free and without any modification from its original state. The author declines all responsibility in the damage this document or any of the things you will do with it might do to anyone or to anything. This document and any of its contents is not copyrighted and is free of all rights, you may thus use it, modify it or destroy it without breaking any international law. However according to the author's will, you may not use this document for commercial profit directly, but you may use indirectly its intellectual contents; in which case I would be pleased to receive a mail of notice or even thanks. This is my first tutorial and I am still a student, you must assume that this document is probably not free of small errors and bugs. In the same state of mind, those algorithms are not fully optimised, they are explained for pedagogical purposes and you may find some redundant computations or other voluntary clumsiness. 1 – Simple sound energy

CGI tutorial: Source files In case you are interested in how CGI scripts can be written, or if you want to compare your attempt at the exercises with mine, here are the Perl files used to generate them. Environment example: Generates an HTML document listing the values of (most of) the current environment variables. The endless document: Displays one of the many(!) pages of a document with infinitely many pages. It uses the QUERY_STRING environment variable to see what page it should generate and what the previous page was. The first page can be found at VIM Adventures algorithm - How to detect BPM of the song by programming Perl CGI Tutorial: First lesson on Perl programming What is Perl/CGI? Perl is a simple programming language. It doesn't have to be used on the web, it can run locally on your computer, but it's popular for use on the web. When it's used on the web the programs are called Perl CGI, because CGI is the way that Perl talks to your web browser. Perl can be used to do things like rotate banners, generate text & HTML on the fly, set cookies, and provide shopping carts. In theory it's pretty simple: Write your Perl program in a text editor, and save it with a .cgi or .pl extension. But if you tried this already it probably didn't work, which is probably why you're here. By the way, I use the terms "program" and "script" in this tutorial interchangeably. And now for the good stuff. I'm sorry, but I can't provide personal assistance with Perl. More resources: Fan Mail Your website was very helpful. Last Update: June 2006

Related: