Skip to content

Instantly share code, notes, and snippets.

Sukhjinder Singh sukhjindersingh

Block or report user

Report or block sukhjindersingh

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
ummdorian / index.php
Created Mar 28, 2018
Drupal 8 Query Alter Group By (views)
View index.php
function module_query_views_events_alter(Drupal\Core\Database\Query\AlterableInterface $query){
// If this the right query
$query->getMetaData('view') != ''
&& $query->getMetaData('view')->getDisplay()->display['id'] == 'block_3'
robdecker / script.js
Created Jun 28, 2013
JS: Embed YouTube & Vimeo videos in a Colorbox popup. Requires
View script.js
(function ($) {
$("#content a[href*='']").each(function() {
$this = $(this);
var href = $this.attr('href');
var vimeoId = href.split('/').pop();
$this.colorbox({ html: function() {
var iframe = '<iframe width="853" height="480" src="' + vimeoId + '?autoplay=1" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
var output = "<div style='line-height: 0px; overflow: hidden;'>" + iframe + '</div>';
return output;
Mulkave / drupal-nginx-virtualhost.conf
Created Jul 29, 2013
drupal virtual host configuration for Nginx
View drupal-nginx-virtualhost.conf
server {
server_name [host];
root /var/www/[document_root]; ## <-- Your only path reference.
# Enable compression, this will help if you have for instance advagg module
# by serving Gzip versions of the files.
gzip_static on;
location = /favicon.ico {
You can’t perform that action at this time.