Skip to content

Instantly share code, notes, and snippets.

View vishnukumarpv's full-sized avatar

VISHNUKUMAR P V vishnukumarpv

View GitHub Profile
#!/bin/bash
# Declare an array to store the URLs
urls=()
# Read the URLs from the text file
while IFS= read -r line; do
urls+=($line)
done < "list.txt"
<?php
namespace Drupal\mymodule\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
/**
* Class JsonApiArticlesController
* @package Drupal\mymodule\Controller
*/
class JsonApiArticlesController {
@vishnukumarpv
vishnukumarpv / ExampleController.php
Created February 28, 2022 05:47 — forked from rakeshjames/ExampleController.php
Drupal 8 Custom module example
<?php
/**
* @file
* @author Rakesh James
* Contains \Drupal\example\Controller\ExampleController.
* Please place this file under your example(module_root_folder)/src/Controller/
*/
namespace Drupal\example\Controller;
/**
* Provides route responses for the Example module.
@vishnukumarpv
vishnukumarpv / 000-default.conf
Last active May 5, 2022 13:29
*.localhost virtual host
<Directory /home/zt-user/Public_Html/>
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
Require all granted
$themes = array (
'reg_subscription_confirm' => array(
'variables' => array(
'body' => NULL,
),
'path' => drupal_get_path('module', '_user_reg') ,
'template' => 'templates/subscription_confirm',
),
);
@vishnukumarpv
vishnukumarpv / HOOK_custom.info
Last active July 24, 2019 12:26
module configuration form Drupal 7
name = Custom
description =
core = 7.x
package = TNM Custom
configure = admin/config/content/HOOK_custom
@vishnukumarpv
vishnukumarpv / Readme.md
Last active February 19, 2018 10:11
Bootstrap 4 form snippets

Move to user folder open your Sublime text 3 and then Preferences -> browse packages Move bootstrap_form.sublime-completions to user folder or make sub folder

example: vitext+tab

this is a personal gist.... consider it as a backup if it is helpfull for you take it

@vishnukumarpv
vishnukumarpv / media-queries.scss
Created January 4, 2017 04:38 — forked from chrisjlee/media-queries.scss
All Media Queries breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
@vishnukumarpv
vishnukumarpv / phpmailer_helper_live_mail_smtp.php
Last active December 17, 2016 11:27
live (hotmail) smtp for php_mailer
<?php
/**
**
** $mail = new Mail;
** $mail->liveSmtp();
** $mail->template( $templt );
** $mail->send( array( 'to' => 'someone@mail.com' ) );
*/
class Mail
@vishnukumarpv
vishnukumarpv / handleUpload.php
Created November 25, 2016 09:10 — forked from Abban/handleUpload.php
jQuery AJAX file uploads. Code for the following blog post: http://abandon.ie/notebook/simple-file-uploads-using-jquery-ajax
<?php // You need to add server side validation and better error handling here
$data = array();
if(isset($_GET['files']))
{
$error = false;
$files = array();
$uploaddir = './uploads/';