Below is a very simple example of how to create a basic websocket using node.js. Websockets are great for maintaining a server/client relationship without as much of the overhead of HTTP web traffic. Today, websockets are used to build a magnitude of browser-based real-time applications (live chats, multiplayer games). Basically it's a persistent connection between the server and client in which both..
This is a simple example using Push and Popstate. This practice is becoming more common throughout sites such as Twitter and Facebook for changing a URL within the address bar without reloading another page. Typically this allows users to bookmark or share URLs when sites are using some type of infinite scroll.
For anyone looking to setup a virtual environment, this post should save you a bit of headache. There are quite a few paths you can choose when looking to setup some type of virtual management system: Virtualbox, VMware, and KVM just to name a few. Personally, I feel as if KVM is the easiest to use and manage plus it’s free on top of being extremely easy to use via command line. Through out this..
The below snippet will create a MySQL user and grant them all permissions on the given database. The % wildcard identifier will allow this particular user to be accessible via any hostname. While the * wildcard will grant the user access to all tables within the supplied database. You can change either to match your specific needs.
Thought it would be a neat exercise to recreate the mIRC $gettok() function in javascript as I've seen it popup in several other languages. The only caveat I'm aware of is when passing multiple N parameters (eg: '2-6' or '2-'); it must be in string format. Otherwise javascript will interpret N and pass undesired results (eg: '-4'). If only passing one N parameter, integer use is recommended.
this will retrieve your halo 3 weapon kills and medals from social rankings. the image id and how many kills/medals gets spit out via array ( example of how to use image id within snippet ). made this for a facebook app that im creating and decided to share. this snippet is not mysql reliant, it stores everything within the specified cache file ('xbl_h3_cache.txt').