Skip to content

Instantly share code, notes, and snippets.

View vinothkannans's full-sized avatar
🏠
Working from home

Vinoth Kannan vinothkannans

🏠
Working from home
View GitHub Profile
@vinothkannans
vinothkannans / FlowLayout.java
Created May 11, 2016 09:41
Android Flow Layout
package com.vinkas.layout;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
@vinothkannans
vinothkannans / material_list_item.xml
Created May 13, 2016 10:59
Two lines list item with primary action image as per android material design guidelines
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="72dp"
android:layout_marginBottom="1dp"
android:elevation="1dp">
<ImageView
android:id="@+id/icon"
android:layout_width="40dp"
@vinothkannans
vinothkannans / license-badges.md
Last active September 13, 2017 23:35 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file. Easily copy and paste the code under the badges into your Markdown files.

Apache

Apache 2.0 License

License
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

BSD

@vinothkannans
vinothkannans / 0_reuse_code.js
Created June 17, 2016 08:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@vinothkannans
vinothkannans / auth.php
Last active July 26, 2016 19:32
Update User Provider to your `config/auth.php` file
<?php
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'firebase_users', /**** Change 'users' to 'firebase_users' ****/
],
'api' => [
@vinothkannans
vinothkannans / donate.md
Last active August 16, 2016 12:47 — forked from skratchdot/donate.md
My Paypal donate button in markdown format

Donation Button

Donate

@vinothkannans
vinothkannans / git-merge.md
Last active March 1, 2024 02:20
Syncing a fork or clone without history of remote commits
  • First fork or clone your remote git project
  • Delete existing history and commits by deleting .git folder
  • Add remote git project as upstream
  • Fetch the branches and their respective commits from the upstream repository. Commits to master will be stored in a local branch, upstream/master.
git fetch upstream
  • Check out your local master branch.
git checkout master
@vinothkannans
vinothkannans / gist:acc2655f8e6e407b4965daf6f8e1edb1
Created June 23, 2017 14:08
taxonomy filter for Newspaper theme
1. Add configure panel in td_config.php insert after line #3830 array( “param_name” => “taxonomy”, “type” => “textfield”, “value” => ’’, “heading” => ‘Filter by taxonomy’, “description” => “Filter by taxonomy of post type”, “holder” => “div”, “class” => ””, ‘group’ => $group ), array( “param_name” => “taxonomy_name”, // search taxonomy using name, change to ‘slug’/’id’ if required. “type” => “textfield”, “value” => ’’, “heading” => ‘Filter by taxonomy name’, “description” => “Filter by taxonomy name of post type”, “holder” => “div”, “class” => ””, ‘group’ => $group ),
2. Add search query in td_data_srouce.php insert after line #243 if(!empty($taxonomy) && !empty($taxonomy_name)){ $wp_query_args[‘tax_query’] = array( array( ‘taxonomy’=>$taxonomy, ‘field’=>’name’, ‘terms’=>$taxonomy_name)); }

Keybase proof

I hereby claim:

  • I am vinothkannans on github.
  • I am vinothkannans (https://keybase.io/vinothkannans) on keybase.
  • I have a public key ASC1Lf8xh6R0FVB__9e2vYTkfu8hznQqefA8Ao1yQGUYLQo

To claim this, I am signing this object:

@vinothkannans
vinothkannans / port-check.sh
Created November 1, 2024 19:16
To check whether a port is open or closed in IP when telnet and netcat are not available
(timeout 1 bash -c '</dev/tcp/127.0.0.1/17500 && echo PORT OPEN || echo PORT CLOSED') 2>/dev/null