# 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
(function(){ | |
var set = function(obj, prop, val){ | |
Object.defineProperty(obj,prop,{ | |
value : val | |
}) | |
return val; | |
}; |
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
name: PDF to PNG | |
on: | |
push: | |
branches: | |
- kaspar | |
pull_request: | |
branches: | |
- kaspar | |
jobs: |
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
// ---- | |
// Sass (v3.3.0.rc.1) | |
// Compass (v0.13.alpha.7) | |
// ---- | |
$zoo: ("puma": black, "sea-slug": green, "egret": brown, "salamander": red); | |
@each $animal, $color in $zoo { | |
.#{$animal}-icon { | |
background-color: $color; |
- Codacy
- Coveralls
- Travis
- Lean Board
- Starhub
- Code Dog Auto Merge
- Greenkeeper
- Dependabot preview
- Hound
- Imgbot
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
## Learn more about this file at 'https://www.gitpod.io/docs/references/gitpod-yml' | |
## | |
## This '.gitpod.yml' file when placed at the root of a project instructs | |
## Gitpod how to prepare & build the project, start development environments | |
## and configure continuous prebuilds. Prebuilds when enabled builds a project | |
## like a CI server so you can start coding right away - no more waiting for | |
## dependencies to download and builds to finish when reviewing pull-requests | |
## or hacking on something new. | |
## | |
## With Gitpod you can develop software from any device (even iPads) via |
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
<?php | |
function generateRandomString($length = 10) { | |
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
$randomString = ''; | |
for ($i = 0; $i < $length; $i++) { | |
$randomString .= $characters[rand(0, strlen($characters) - 1)]; | |
} | |
return $randomString; | |
} |
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
<?php | |
function emptyDirectory($dirname,$self_delete=false){ | |
if(is_dir($dirname)) | |
$dir_handle = opendir($dirname); | |
if(!$dir_handle) | |
return false; | |
while($file = readdir($dir_handle)){ | |
if($file != "." && $file != ".."){ | |
if (!is_dir($dirname."/".$file)) | |
@unlink($dirname."/".$file); |