# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
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
import datetime | |
from pprint import pprint | |
from django.db import models, signals | |
from django.utils import timezone | |
import django.dispatch | |
This combines the instructions on a few different tutorials:
- Tabula EC2 AMI quickstart - A nice illustrated How-To for a basic EC2 setup, including permissions setup. The instructions apply to a specific demo app but apply to any EC2 usage
- Code by Zack » Getting RVM set up on Amazon EC2 - How to install the latest stable version of Ruby (1.9.3p392) with RVM
- Code by Zack » Setting up Passenger with rvm on Ubuntu - Installing Passenger and using it to set up nginx. The instructions at the end of Zack's guide on creating an init script apply to Ubuntu only.
- [Slicehost Articles: Cen
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
/** | |
* redirect javascript bookmarklet | |
*/ | |
// javascript:location.href='http://example.com/?uri='+encodeURIComponent(location.href) | |
/** | |
* bookmarklet loaded on site | |
*/ | |
(function(){ |
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
flags = [ | |
'-Wall', | |
'-Wextra', | |
'-Werror', | |
'-fexceptions', | |
'-DNDEBUG', | |
'-DUSE_CLANG_COMPLETER', | |
'-pthread', | |
'-I/usr/include/gtk-3.0', | |
'-I/usr/include/at-spi2-atk/2.0', |
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
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c> |
Securing a server is a continuous process as new vulnerabilities are discovered everyday. But you will be relatively safe if you take some basic security measures like locking root access, not allowing password authentication, setting up a basic firewall and log watching mechanism and enabling automatic updates.
1. Login as root and update package list and upgrade tools.