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
.filter('summaryText', function () { | |
return function (value, wordwise, max, tail) { | |
if (!value) return ''; | |
max = parseInt(max, 10); | |
if (!max) return value; | |
if (value.length <= max) return value; | |
value = value.substr(0, max); | |
if (wordwise) { |
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
/** | |
* 200 (OK) CSV Response | |
* | |
* Usage: | |
* return res.csv(data); | |
* | |
* @param {Object} data | |
* - must be an object array | |
* @param {String|Object} options | |
* - columns : column names we want for the CSV must be a string array |
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
<button type='button' | |
id="startTimer" | |
class='btn btn-primary'>start timer</button> | |
<button type='button' | |
id='stopTimer' | |
class='btn btn-danger hide'>stop timer</button> |
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
/* | |
description - a cross browser opactity function | |
usage example: | |
.my-class{ | |
.opacity(.50); | |
} | |
@param: amount - expects a floating point decimal. |
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
INSERT INTO `selective_search_groups` (`id`, `date_created`, `name`, `sequence`, `group_type`, `description`) | |
VALUES | |
(3, '2014-06-11 07:07:34', 'Moods', 4, 'and', NULL), | |
(4, '2014-06-11 07:06:52', 'Instruments', 5, 'and', NULL), | |
(5, '2014-06-11 07:09:15', 'Music Styles', 2, 'and', NULL), | |
(7, '2014-06-11 07:07:34', 'Time', 3, 'and', NULL), | |
(8, NULL, 'Genre', 1, 'and', NULL), | |
(9, '2014-06-11 07:07:34', 'Usages', 5, 'and', NULL), | |
(12, '2014-06-11 07:07:34', 'Time', 6, 'and', NULL); |
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 ajaxRequest(url, onSuccess, onError){ | |
var xmlhttp = new XMLHttpRequest(), | |
response = null; | |
xmlhttp.onreadystatechange = function() { | |
if (xmlhttp.readyState == 4) { | |
if(xmlhttp.status == 200){ | |
response = JSON.parse(xmlhttp.responseText); | |
onSuccess(response); | |
} | |
else { |
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
app.use(function(req, res, next) { | |
var schema = req.headers['x-forwarded-proto']; | |
if (schema === 'https') { | |
next(); | |
} | |
else { | |
res.redirect('https://' + req.headers.host + req.url); | |
} | |
}); |
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
.import-font(@fileName, @filePath, @fontFamily){ | |
@font-face { | |
font-family: @fontFamily; | |
src: url('@{filePath}@{fileName}.eot'); | |
src: url('@{filePath}@{fileName}.eot?#iefix') format('embedded-opentype'), | |
url('@{filePath}@{fileName}.woff') format('woff'), | |
url('@{filePath}@{fileName}.ttf') format('truetype'), | |
url('@{filePath}@{fileName}.svg#@{fileName}') format('svg'); | |
font-weight: normal; | |
font-style: normal; |
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
find . -name "*.wav" -exec sh -c 'ffmpeg -i $(basename {}) $(basename {} | cut -f 1 -d '.').mp3' \; |
OlderNewer