# 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
/* Copyright 2011 the original author or authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, |
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
#!/usr/bin/python | |
import sys | |
import argparse | |
import os | |
import re | |
''' | |
A simple script to create lower-resolution Android drawables from higher-resolution ones. |
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
ko.bindingHandlers.addressAutocomplete = { | |
init: function (element, valueAccessor, allBindingsAccessor) { | |
var value = valueAccessor(), allBindings = allBindingsAccessor(); | |
var options = { types: ['geocode'] }; | |
ko.utils.extend(options, allBindings.autocompleteOptions) | |
var autocomplete = new google.maps.places.Autocomplete(element, options); | |
google.maps.event.addListener(autocomplete, 'place_changed', function () { |
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
/* | |
* Copyright 2014 Chris Banes | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
for Android Bluetooth Low Energy
Tired of remembering which properties go with which bits in the properties bitmask of a BluetoothGattCharacteristic
? Me too. Here's an easy-to-read table. Source.
Bit Value | Meaning
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
#!/usr/bin/env bash | |
# | |
# NodeJS Installer based on https://gist.github.com/trajakovic/ad9f91776dea3b495db0 | |
# | |
# Added version option and distinct commands for install, uninstall, path setting, | |
# and removepath setting. | |
# | |
# https://gist.github.com/bnielsen1965 | |
# | |
# THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. |
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
--- | |
apiVersion: batch/v2alpha1 | |
kind: CronJob | |
metadata: | |
name: hello | |
spec: | |
schedule: "*/1 * * * *" | |
jobTemplate: | |
spec: | |
template: |