Skip to content

Instantly share code, notes, and snippets.

View vigikaran's full-sized avatar
🎯
All the tools are out there and the only thing that limits us is our imagination

Vigikaran vigikaran

🎯
All the tools are out there and the only thing that limits us is our imagination
View GitHub Profile
@vigikaran
vigikaran / frontendDevlopmentBookmarks.md
Created February 6, 2017 17:56 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@vigikaran
vigikaran / countries.sql
Created February 6, 2017 18:00 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
[
/*{
"in": "/25671928/tamilwin.banner//header",
"sz": [
[970, 250],
[970, 90],
[728, 90],
[320, 100]
],
"sl": "dfp_banner_header",
@vigikaran
vigikaran / sort-object-properties-by-value.md
Created April 5, 2017 10:45 — forked from umidjons/sort-object-properties-by-value.md
JavaScript: sort object properties by value (numeric or string)

Sort object properties by value (values are text)

I have following object:

var cities={10:'Tashkent', 14:'Karakalpakiya', 16:'Andijan'};

I want sort it by city names, so after sort it should be:

var cities={16:'Andijan', 14:'Karakalpakiya', 10:'Tashkent'};

But I can't sort object properties, instead can convert object into array, then sort items.

@vigikaran
vigikaran / Pull-and-Sync-Data-Between-Google-Doc-Spreadsheet-and-MySQL.gs
Created April 5, 2017 17:18
You can pull data from MySQL database to Google doc spreadsheet auto with just click of a button or scheduled time. This is great use for retrieving data in spreadsheet format.
// MySQL to Google Spreadsheet By Pradeep Bheron
// Support and contact at pradeepbheron.com
function myMySQLFetchData() {
var conn = Jdbc.getConnection('jdbc:mysql://127.0.0.1:3306/employee_db', 'username', 'pass'); // Change it as per your database credentials
var stmt = conn.createStatement();
var start = new Date(); // Get script starting time
@vigikaran
vigikaran / s3_to_netstorage.sh
Created April 11, 2017 10:05 — forked from hyamamoto/ s3_to_netstorage.sh
Send file Amazon S3 bucket (aws sync) to Akamai NetStorage directory (secure rsync). Comment out 2 lines for --delete behavior.
#!/usr/bin/env bash
#
# Sync Amason S3 Bucket with Akamai NetStorage
#
# Dependency:
# "aws" command : AWS CLI
# "rsync" command :yeah, the one.
# .aws/credentials : AWS Credential file (for aws command)
# .ssj/netstorage.ppk : Private Key for your NetStorage account
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfsWjLFom9vy5T5LUYXI/M2ayJmuMwivsWpms3ky8DSxldzbOO/r7R7P1Em+EyOgNSF6pyVLrnzG6jYY72B+CAwdBwSEymcE497x+70PXnCkkjE0A5kNxjpn0PP4VwuMCshpOTAVbwSTQ9H1H/xWiXGllwniY5SPR646I542UBL+nk3/NdNRVv6yyQxl0JTWaL3jXPA1eGnUMSjDq/wa15ssVz6o174BAESlOmUWnzJAv1MYb3NdhGXah/zP2wziP1kiBNJCH/EnZVshqfiagMKew3evbpQpcShVT3iVwbzadXpgxbH6AJO3pGmI4+orvvQbDooILUvrgCVGRA4JbL [email protected]
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://mydomain.com/uk</loc>
<xhtml:link
rel="alternate"
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta itemprop="name" content="Friends Matrimony">
<meta itemprop="image" content="https://www.friendsmatrimony.com/images/logo.png">
<meta itemprop="description" content="Exclusive Matrimony services for Indian Brides and Grooms Around the World, Friendsmatrimony.com is a Great Place to find your Life Partner.">
public function refreshAdminToken(Request $request)
{
if($this->validRefreshRequest($request))
{
$admin_user_token = $request->input('admin_user_token');
$secretKey = config('jwt.admin');
try{
$decoded = JWT::decode($admin_user_token, $secretKey, ['HS512']);