Skip to content

Instantly share code, notes, and snippets.

$outer-space-black: #2E3741;
$modal-box-shadow: $outer-space-black;
$zModal-close: 100;
@mixin modal($width: 680px, $height: 523px) {
.modal-dialog {
min-height: $height;
width: $width;
& .modal-content {
UNIX_EPOCH_DATETIME = datetime.datetime(1970, 1, 1)
def get_current_utc_timestamp_ms():
return int(round((datetime.datetime.utcnow() - UNIX_EPOCH_DATETIME).total_seconds() * 1000))
const FILTERS = {
'campaignStatuses': {
activeValue: 'expired',
filterValues: [
{
displayName: 'All',
['<filterName or filterValue>']: 'all'
},
{
displayName: 'Drafts',
{% set filteredPosts = posts | selectattr("link") %}
{# filter posts to posts that actually contain a link #}
{% if filteredPosts and (filteredPosts | length) %}
"use strict";
var App = {
Models: {
Photo:{}
},
Collections: {
PhotoCollection: {}
},
Views: {
"use strict";
// Individual Thumbnail View - many many instances
App.Views.ThumbView = Backbone.View.extend({
template: _.template($(".thumb-view-template").text()),
className: "thumb-container",
initialize: function () {
var AppView = Parse.View.extend({
initialize: function () {
this.collection = new FullPostCollection();
this.collection.on('add', this.addPost)
this.collection.fetch({add:true});
},
addPost: function (pic) {
new ThumbnailView({model: pic});
}
var comment = $('.imageComment').val();
//takes the value of the comment field and clears it
$('.imageComment').val('');
var url = $('.imageURL').val();
$('.imageURL').val('');
//creates a new instance of the constructor POST passing the three assigned variables
var outgoingPost = new Post();
outgoingPost.set({
this.imageSlide = function () {
return $('.image-slider').css({'margin-left': '-=392px'});
}
// interval function that will call the imageSlide animation every set interval (parameter or default of 2400)
// if the counter hits the array length - 1, it will reset itself back to 0 and also move the image slider to 0.
this.changeImage = function () {
setInterval(function () {
this.imageSlide();
i += 1;
function switchUp (array) {
coolArray = (array.slice(2)).concat(array.slice(0,2))
return coolArray;
}
// if passed [1,2,3,4,5,6,7] returns [3, 4, 5, 6, 7, 1, 2]