Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
<?php | |
use Drupal\file\Entity\File; | |
use Drupal\image\Entity\ImageStyle; | |
// File ID. | |
$fid = 123; | |
// Load file. | |
$file = File::load($fid); | |
// Get origin image URI. | |
$image_uri = $file->getFileUri(); | |
// Load image style "thumbnail". |
<script> | |
/*Get the query string so we can pass it as the input value, to save the user from typing it twice*/ | |
$(document).ready(function() { | |
function gup( name ) | |
{ | |
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); | |
var regexS = "[\\?&]"+name+"=([^&#]*)"; | |
var regex = new RegExp( regexS ); | |
var results = regex.exec( window.location.href ); | |
if( results == null ) |
<#-- dump.ftl | |
-- | |
-- Generates tree representations of data model items. | |
-- | |
-- Usage: | |
-- <#import "dump.ftl" as dumper> | |
-- | |
-- <#assign foo = something.in["your"].data[0].model /> | |
-- | |
-- <@dumper.dump foo /> |
# Load DSL and Setup Up Stages | |
require 'capistrano/setup' | |
# Includes default deployment tasks | |
require 'capistrano/deploy' | |
# Custom tasks | |
require 'capistrano/composer' | |
require 'capistrano/npm' |
// Requires jQuery of course. | |
$(document).ready(function() { | |
$('.show-comments').on('click', function(){ | |
var disqus_shortname = 'YOUR-DISQUS-USERNAME'; // Replace this value with *your* username. | |
// ajax request to load the disqus javascript | |
$.ajax({ | |
type: "GET", | |
url: "http://" + disqus_shortname + ".disqus.com/embed.js", | |
dataType: "script", |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html