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
@Mulkave
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 {
@robdecker
robdecker / script.js
Created Jun 28, 2013
JS: Embed YouTube & Vimeo videos in a Colorbox popup. Requires http://www.jacklmoore.com/colorbox/
View script.js
(function ($) {
$("#content a[href*='vimeo.com']").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="http://player.vimeo.com/video/' + vimeoId + '?autoplay=1" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
var output = "<div style='line-height: 0px; overflow: hidden;'>" + iframe + '</div>';
return output;
}});
@ummdorian
ummdorian / index.php
Created Mar 28, 2018
Drupal 8 Query Alter Group By (views)
View index.php
<?php
function module_query_views_events_alter(Drupal\Core\Database\Query\AlterableInterface $query){
// If this the right query
if(
$query->getMetaData('view') != ''
&& $query->getMetaData('view')->getDisplay()->display['id'] == 'block_3'
){
You can’t perform that action at this time.