Skip to content

Instantly share code, notes, and snippets.

View shobhitsinghal624's full-sized avatar

Shobhit Singhal shobhitsinghal624

View GitHub Profile
@shobhitsinghal624
shobhitsinghal624 / speedtest.py
Created July 5, 2017 10:36
Command Line Speed Test
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2012-2016 Matt Martz
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@shobhitsinghal624
shobhitsinghal624 / ImportJSON.gs
Created May 31, 2017 16:23
Google Spreadsheets - ImportJSON, ImportJSONViaPOST
/*====================================================================================================================================*
ImportJSON by Trevor Lohrbeer (@FastFedora)
====================================================================================================================================
Version: 1.2.0
Project Page: http://blog.fastfedora.com/projects/import-json
Copyright: (c) 2012-2013 by Trevor Lohrbeer
License: GNU General Public License, version 3 (GPL-3.0)
http://www.opensource.org/licenses/gpl-3.0.html
------------------------------------------------------------------------------------------------------------------------------------
A library for importing JSON feeds into Google spreadsheets. Functions include:
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@shobhitsinghal624
shobhitsinghal624 / install_steam
Last active July 24, 2018 08:21 — forked from vespakoen/install_steam
install steam & age of empires 2 HD on ubuntu 14.04
# install wine 1.7
add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.7
# download steam
curl -o ~/Downloads/SteamSetup.exe http://media.steampowered.com/client/installer/SteamSetup.exe
# install some tricks
winetricks vcrun2010
#! /usr/bin/env bash
cd ~
# Install LAMP - apache, php
sudo apt-get install --assume-yes apache2 php5 mysql-server-5.6 mysql-client-5.6
sudo service apache2 stop
# Install LAMP - mysql
sudo apt-get install --assume-yes mysql-server-5.6 mysql-client-5.6
#! /usr/bin/env bash
cd ~
# Install LAMP
sudo apt-get install --assume-yes apache2 mysql-server php5 php5-mysql
# Install other needed stuff
sudo apt-get install --assume-yes wget
@shobhitsinghal624
shobhitsinghal624 / install-wordpress.sh
Last active January 30, 2016 06:44
Wordpress Installation Scripts - New Ubuntu EC2 Instance
#! /usr/bin/env bash
cd ~
# Install LAMP
sudo apt-get install --assume-yes apache2 mysql-server php5 php5-mysql
# Install other needed stuff
sudo apt-get install --assume-yes wget dos2unix
@shobhitsinghal624
shobhitsinghal624 / install-mautic.sh
Last active March 4, 2016 06:26
Mautic Installation Scripts - New Ubuntu EC2 Instance
#! /usr/bin/env bash
cd ~
# Install LAMP
sudo apt-get install --assume-yes apache2 mysql-server php5 php5-mysql
# Install other needed stuff
sudo apt-get install --assume-yes unzip
@shobhitsinghal624
shobhitsinghal624 / simpleNodeServer.js
Last active August 29, 2015 14:02
a simple node.js based server for useful for testing
var http = require('http');
var querystring = require('querystring');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'application/json'});
console.log('#### [Start] Request ###');
console.log('Method: ' + req.method);
console.log('URL: ' + req.url);
console.log('Headers: ');
console.log(req.headers);