Skip to content

Instantly share code, notes, and snippets.

! function(e) {
"use strict";
e.ThreeSixty = function(t, r) {
var a, n = this,
i = [];
n.$el = e(t), n.el = t, n.$el.data("ThreeSixty", n), n.init = function() {
a = e.extend({}, e.ThreeSixty.defaultOptions, r), a.disableSpin && (a.currentFrame = 1, a.endFrame = 1), n.initProgress(), n.loadImages()
}, n.resize = function() {}, n.initProgress = function() {
n.$el.css({
width: a.width + "px",
@thebrainroom
thebrainroom / blissgo.php
Last active December 20, 2016 11:34
Get image style programmatically for Drupal 8
<?php
use Drupal\image\Entity\ImageStyle;
function blissgo_preprocess_node(&$variables) {
$node = $variables['node'];
if(!empty($node->field_image[0])) {
$path = $node->field_image->entity->getFileUri();
$url = ImageStyle::load('teaser_image')->buildUrl($path);
.matrix-container {
padding: 60px 0 60px -10px;
@media #{$breakpoint-full} {
padding: 20px;
}
@media #{$breakpoint-medium} {
display: none;
}

Keybase proof

I hereby claim:

  • I am thebrainroom on github.
  • I am thebrainroom (https://keybase.io/thebrainroom) on keybase.
  • I have a public key whose fingerprint is 71A7 4627 7248 90F7 FF1E 3D06 D6C4 BD0E 481D 293D

To claim this, I am signing this object:

@thebrainroom
thebrainroom / Drupal support for Recents app.
Created May 28, 2014 09:33
Snippet of JSON to add support for Drupal projects in Recents app (http://recents.io). I'm looking for suggestions for the best way to get the active theme name for use as the project name. To enable the Drupal icon add an icon of your choosing by going to "Applications", right click "Recents" and select "show package contents". Now open the "Re…
{
"projectType":"drupal",
"nameRegex":null,
"settingsFile":"sites/default/settings.php",
"image":"drupal.png",
"keyFile":"settings.php",
"projectRootRelativeToKeyFile":"../../../",
"filesExistInRoot":null,
"ignoreIfFilesInRoot":null,
"ignoreIfPathContains":null,
@thebrainroom
thebrainroom / SublimeText2-Preferences
Created April 25, 2013 14:28
My personal Sublime Text 2 preferences.
{
// Flatland theme settings
"theme": "Flatland.sublime-theme",
"flatland_square_tabs": true,
// Colour scheme
"color_scheme": "Packages/Dayle Rees Color Schemes/LastNight.tmTheme",
// Type settings
"font_face": "Droid Sans Mono",
@thebrainroom
thebrainroom / inView.js
Created October 10, 2012 11:49
Detect if an element is in view and execute some fun stuff :)
//Function to determine whether an element is in view
function isScrolledIntoView(elem) {
var docViewTop = $(window).scrollTop();
var docViewBottom = docViewTop + $(window).height();
var elemTop = $(elem).offset().top;
var elemBottom = elemTop + $(elem).height();
return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom));
}
$(document).ready(function() {
@thebrainroom
thebrainroom / dabblet.css
Created August 29, 2012 15:44
Single color (no gradient) CSS3 buttons
/**
* Single color (no gradient) CSS3 buttons
*/
* {
margin: 0;
padding: 0;
}
html {
@thebrainroom
thebrainroom / dabblet.css
Created August 29, 2012 15:43
Single color (no gradient) CSS3 buttons
/**
* Single color (no gradient) CSS3 buttons
*/
* {
margin: 0;
padding: 0;
}
html {
@thebrainroom
thebrainroom / dabblet.css
Created August 14, 2012 16:17
Single color (no gradient) CSS3 buttons
/**
* Single color (no gradient) CSS3 buttons
*/
* {
margin: 0;
padding: 0;
}
html {