Skip to content

Instantly share code, notes, and snippets.

View visabhishek's full-sized avatar
💭
I may be slow to respond.

Abhishek visabhishek

💭
I may be slow to respond.
View GitHub Profile
#!/bin/bash
drush sqlq "select type from node_type" | while read content_type;
do
echo "Changing comment settings for $content_type"
drush vset comment_default_mode_$content_type 0
drush vset comment_default_per_page_$content_type 50
drush vset comment_$content_type 2
drush vset comment_form_location_$content_type 1
drush vset comment_preview_$content_type 0
drush vset comment_subject_field_$content_type 0
@visabhishek
visabhishek / __INDEX.txt
Created June 23, 2016 12:44 — forked from facine/__INDEX.txt
Drupal 8 - Examples
# Taxonomy terms:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_taxonomy_term-php
# Menu links:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_menu_link-php
# File items:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_file-php
# Nodes:
@visabhishek
visabhishek / xss-game.md
Created April 3, 2018 10:16 — forked from adriaandens/xss-game.md
xss-game by Google

XSS-game by Google

Welcome, recruit! Cross-site scripting (XSS) bugs are one of the most common and dangerous types of vulnerabilities in Web applications. These nasty buggers can allow your enemies to steal or modify user data in your apps and you must learn to dispatch them, pronto!

At Google, we know very well how important these bugs are. In fact, Google is so serious about finding and fixing XSS issues that we are paying mercenaries up to $7,500 for dangerous XSS bugs discovered in our most sensitive products.

In this training program, you will learn to find and exploit XSS bugs. You'll use this knowledge to confuse and infuriate your adversaries by preventing such bugs from happening in your applications.

There will be cake at the end of the test.

@visabhishek
visabhishek / drupal8-links.php
Created June 6, 2018 09:49 — forked from colorfield/drupal8-links.php
Drupal 8 links, or where is my l() function
@visabhishek
visabhishek / css-media-queries-cheat-sheet.css
Last active September 19, 2018 08:50 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Desktop Layout Sizes (Can range from 960-1140 depending on your layout.)
@media only screen and (min-width:1025px) {}
Tablet (Landscape)
@media only screen and (min-width:769px) and (max-width:1024px) {}
Tablet (Portrait)
@media only screen and (min-width:581px) and (max-width:768px) {}
Phone (Landscape)
@media only screen and (min-width:321px) and (max-width:580px) {}
@visabhishek
visabhishek / lotus.js
Created December 19, 2018 12:52 — forked from camoa/lotus.js
Passing settings to a javascript library
(function ($, Drupal, drupalSettings) {
Drupal.behaviors.LotusBehavior = {
attach: function (context, settings) {
// can access setting from 'drupalSettings';
var lotusHeight = drupalSettings.lotus.lotusJS.lotus_height;
$('lotusElement').css('height', lotusHeight);
}
};
})(jQuery, Drupal, drupalSettings);
name: 'Ajax Example'
description: 'Just an Ajax Example'
core: 8.x
type: module
# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# Default backend definition. Set this to point to your content
# server.
#
backend default {
.host = "127.0.0.1";
.port = "8080";
}
@visabhishek
visabhishek / .lando.yml
Created May 24, 2019 13:21 — forked from tormi/.lando.yml
Gatsby with Lando
# Quickstart for Gatsby starter within Lando environment
#
# Install Lando v. >RC1.
# Place .lando.yml inside some directory and cd there.
# `git init . && git remote add origin https://github.com/gatsbyjs/gatsby-starter-default.git && git pull origin master`
# (feel free to use any starter repo URL).
# `lando start`.
# Use `lando` for commands available.
name: gatsby
@visabhishek
visabhishek / .lando.yml
Created June 26, 2019 08:35 — forked from colorfield/.lando.yml
Drupal Lando configuration for Solr 7 and Search API
name: drupal-solr
recipe: drupal8
config:
# PHP 7 is required for Search API Solr 2.
php: '7.2'
webroot: web
# Get nice url's for each service.
proxy: