Skip to content

Instantly share code, notes, and snippets.

Alan Sprecacenere tegola

Block or report user

Report or block tegola

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tegola
tegola / timeToClockFormat.js
Last active Sep 9, 2017
Convert a string in decimal or clock format in hh:mm format using moment.js
View timeToClockFormat.js
/**
* Convert a string in decimal or clock format in hh:mm format using moment.js
* Examples:
* 1.5 > 1:30
* 1,4 > 1:24
* 2:70 > 3:10
*
* @param string time
* @return string
*/
@tegola
tegola / gist:2ae7a1263cc6c31da307
Last active Aug 29, 2015
Cordova notification dialogs' wrapper for mixed web app/packaged app
View gist:2ae7a1263cc6c31da307
/*
Custom wrappers for javascript's alert/confirm/prompt and their respective cordova counterparts:
https://github.com/apache/cordova-plugin-dialogs
Useful if you want to keep the same codebase on a web and a packaged app. Just keep in mind that javascript dialogs are synchronous, while cordova's are not.
Usage (for the prompt):
showPrompt("What's your name?", null, function(value){
if (value) {
console.log("Your name: "+ value);
@tegola
tegola / gist:11386f68071219e25f99
Created Jun 30, 2014
Bootstrap - Responsive image align left/center/right
View gist:11386f68071219e25f99
/*
Align Bootstrap's .img-responsive images in a left, center or right aligned text container
Replaces original .img-responsive class
*/
// Responsive images (ensure images don't scale beyond their parents)
.img-responsive {
@include img-responsive();
.text-left & {
You can’t perform that action at this time.