Skip to content

Instantly share code, notes, and snippets.

View varun-raj's full-sized avatar

Varun Raj Manoharan varun-raj

View GitHub Profile
@varun-raj
varun-raj / pullJSON.js
Last active October 31, 2022 16:19
Google App Script To Fetch Data From JSON Webservice and Write them to google spreadsheet.
function pullJSON() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheets = ss.getSheets();
var sheet = ss.getActiveSheet();
var url="http://example.com/feeds?type=json"; // Paste your JSON URL here
var response = UrlFetchApp.fetch(url); // get feed
var dataAll = JSON.parse(response.getContentText()); //
@varun-raj
varun-raj / Passenger_Nginx_Module_Init_Script
Created June 1, 2015 11:29
Passenger Nginx Module Init Script
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@varun-raj
varun-raj / dropbox_import.rb
Last active September 26, 2016 04:26
dropbox_import.rb
require 'dropbox_sdk'
require 'fileutils'
require 'sinatra'
require 'sinatra/reloader'
$client = DropboxClient.new("YOUR KEY HERE")
$path = "/"
$root_path = "/Users/skcripthq/Projects/DropBox"
server
{
listen 2662;
server_name example.com .example.com;
root /home/varunraj/Projects/php-project/;
index index.html index.htm index.php;
location ~* \.(ico|css|js|gif|jpe?g|png)$
{
This file has been truncated, but you can view the full file.
!function(e){var t,i;!function(){function e(e,t){if(!t)return e;if(0===e.indexOf(".")){var i=t.split("/"),n=e.split("/"),a=i.length-1,o=n.length,r=0,s=0;e:for(var l=0;o>l;l++)switch(n[l]){case"..":if(!(a>r))break e;r++,s++;break;case".":s++;break;default:break e}return i.length=a-r,n=n.slice(s),i.concat(n).join("/")}return e}function n(t){function i(i,r){if("string"==typeof i){var s=n[i];return s||(s=o(e(i,t)),n[i]=s),s}i instanceof Array&&(r=r||function(){},r.apply(this,a(i,r,t)))}var n={};return i}function a(i,n,a){for(var s=[],l=r[a],h=0,m=Math.min(i.length,n.length);m>h;h++){var V,U=e(i[h],a);switch(U){case"require":V=l&&l.require||t;break;case"exports":V=l.exports;break;case"module":V=l;break;default:V=o(U)}s.push(V)}return s}function o(e){var t=r[e];if(!t)throw new Error("No "+e);if(!t.defined){var i=t.factory,n=i.apply(this,a(t.deps||[],i,e));"undefined"!=typeof n&&(t.exports=n),t.defined=1}return t.exports}var r={};i=function(e,t,i){r[e]={id:e,deps:t,factory:i,defined:0,exports:{},require:n(e)}},t=n("
@varun-raj
varun-raj / firebase_config.js
Last active December 9, 2016 04:11
Firebase + React Native Code
import * as firebase from "firebase";
var config = {
apiKey: "<YOUR API KEY GOES HERE >",
authDomain: "<YOUR APP DOMAIN GOES HERE>",
databaseURL: "<YOUR DATABASE URL>",
};
firebase.initializeApp(config);
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
TouchableHighlight,
View,
AsyncStorage
} from 'react-native';
@varun-raj
varun-raj / .block
Last active July 9, 2020 04:41
Interactive Gantt Chart
border: no
@varun-raj
varun-raj / config_object.js
Last active November 17, 2019 07:54
Gantt Chart Demo
var config = {
data: data, // Your actuall data
element: "#Chart", // The element for rendering the chart
box_padding: 10, // Padding for the blocks
metrics: {type: "sprint", year: 2017, cycles: cycles}, // Type of gantt
onClick: function(data) {
console.log(data); // Onclick of each node
},
onEmptyButtonClick: function() {
console.log("Empty Clicked");
var data = [
{
id: 1,
title: "Make significant improvements in the UI/UX Design Process Make significant improvements in the UI/UX Design Process",
start_date: "08/08/2016",
end_date: "03/09/2017",
value: 67,
term: "Short Term",
completion_percentage: 29,
color: "#770051",