# 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 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
From this [issue](https://github.com/puphpet/puphpet/issues/1025#issuecomment-157059174): | |
I know that this issue is closed, but as I spent a lot of time to understand what was going on, I made some researches and I can explain why this happen, and you can fix it. | |
Using git config core.autocrlf true can help, but not on a multi-developpers project. | |
This command has to be the same on each developper machine, and that's not always the case. | |
You have to use the .gitattributes provided in the puphpet archive and edit it as follow (carefull, this file need to be in your project root) | |
You also need to use an IDE that allow you to save/edit files as LF (like phpstorm). You can check the type of the file in the bottom right corner, in the status bar (you'll see LF or CRLF while a file is opened) |
This file contains 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
# | |
# DO NOT EDIT THIS FILE | |
# | |
# It is automatically generated by grub-mkconfig using templates | |
# from /etc/grub.d and settings from /etc/default/grub | |
# | |
### BEGIN /etc/grub.d/00_header ### | |
if [ -s $prefix/grubenv ]; then | |
set have_grubenv=true |
This file contains 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
#To install: | |
# | |
#In your git configuration (for instance, .git/config to do it at the project level), add: | |
# | |
#[merge "json_merge"] | |
# name = A custom merge driver for json files | |
# driver = coffee json_merge.coffee %O %A %B | |
# recursive = binary | |
# | |
#In your project's .gitattributes file, add something like: |
This file contains 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
#backup a disk by snapshot to S3. | |
param | |
( | |
[string] $path, #directry to clean of old files | |
[int] $diskNumber, | |
[string] $ec2VolumeId, #volumn arn in ec2 | |
[string] $description, | |
[int] $days = 2 | |
); |
This file contains 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
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
This file contains 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
/** | |
* Author: Michael Weibel <michael.weibel@gmail.com> | |
* License: MIT | |
*/ | |
var passport = require('passport') | |
, StrategyMock = require('./strategy-mock'); | |
module.exports = function(app, options) { | |
// create your verify function on your own -- should do similar things as |
This file contains 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
<!-- copy this to YOUR_THEME.tmTheme--> | |
<dict> | |
<key>name</key> | |
<string>diff: deleted</string> | |
<key>scope</key> | |
<string>markup.deleted</string> | |
<key>settings</key> | |
<dict> | |
<key>background</key> | |
<string>#EAE3CA</string> |