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
// Get current date time | |
var currentDate = new Date(); | |
// get date | |
var date = currentDate.getDate(); | |
// get month index (January is 0) | |
var month = currentDate.getMonth(); | |
// get year |
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
pg_dump --schema='source_schema' database_name | sed 's/source_schema/destination_schema/g' | psql -d database_name |
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
# new BackgroundPrint('http://book.pdf').print() | |
class window.BackgroundPrint | |
constructor: (url)-> | |
@url = url | |
print: -> | |
@_createFrame() | |
@_handleFrameLoad() | |
@_loadFrame() | |
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
// new ParamsHandler({ location_id: object.id, page: 1 }).redirect(); | |
window.ParamsHandler = (function() { | |
function ParamsHandler(params) { | |
this.params = params; | |
this.kvp = document.location.search.substr(1).split('&'); | |
} | |
ParamsHandler.prototype.redirect = function() { | |
this._mapParams(); |
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
window.Humanize = { | |
// Humanize.numberToCurrency(100) => "$100" | |
// Humanize.numberToCurrency(10000) => "$10,000" | |
// Humanize.numberToCurrency(50.0501) => "$50.0501" | |
// Humanize.numberToCurrency(50.0501, { precision: 2 }) => "$50.05" | |
// Humanize.numberToCurrency(50, { unit: '£' }) => "£50" | |
// Humanize.numberToCurrency(10000, { delimiter: ';' }) => "$10;000" | |
numberToCurrency: function(number, paramsOptions) { | |
var defaultOptions, delimited, delimiter, fixed, options, precision, unit; |
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
window.Humanize = | |
# Humanize.numberToCurrency(100) => "$100" | |
# Humanize.numberToCurrency(10000) => "$10,000" | |
# Humanize.numberToCurrency(50.0501) => "$50.0501" | |
# Humanize.numberToCurrency(50.0501, { precision: 2 }) => "$50.05" | |
# Humanize.numberToCurrency(50, { unit: '£' }) => "£50" | |
# Humanize.numberToCurrency(10000, { delimiter: ';' }) => "$10;000" | |
numberToCurrency: (number, paramsOptions={})-> | |
defaultOptions = |
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
// Define animation name, and properties | |
/* | |
@include keyframes(fade-out) { | |
0% { opacity: 1; } | |
90% { opacity: 0; } | |
} | |
*/ | |
@mixin keyframes($animation-name) { | |
@-webkit-keyframes #{$animation-name} { | |
@content; |
NewerOlder