Skip to content

Instantly share code, notes, and snippets.

View tusharvikky's full-sized avatar
💭
contemplating...

Tushar Deo tusharvikky

💭
contemplating...
View GitHub Profile
@tusharvikky
tusharvikky / undo-delete-git-file.md
Created June 20, 2016 21:20
Find and restore a deleted file in a Git repository

Find the last commit that affected the given path. As the file isn't in the HEAD commit, this commit must have deleted it.

git rev-list -n 1 HEAD -- <file_path>

Then checkout the version at the commit before, using the caret (^) symbol:

git checkout <deleting_commit>^ -- <file_path>

Or in one command, if $file is the file in question.

@tusharvikky
tusharvikky / le-renew.sh
Created June 11, 2016 18:25 — forked from bjornjohansen/le-renew.sh
Let's Encrypt renewal script for Nginx
#!/bin/bash
#================================================================
# Let's Encrypt renewal script for Nginx based on the script
# by Erika Heidi for Apache on Ubuntu/Debian
# @author Erika Heidi<[email protected]>
# @author Bjørn Johansen <[email protected]>
# Usage: ./le-renew.sh [base-domain-name] [path-to-webroot]
#================================================================
domain=$1
webroot=$2
@tusharvikky
tusharvikky / docker-resources.md
Created September 26, 2015 22:15 — forked from rgaidot/docker-resources.md
Docker Resources All In One - A collection of docker online resources
@tusharvikky
tusharvikky / lamp-stack-osx-virtualhostx.md
Last active September 2, 2015 17:26 — forked from pwenzel/lamp-stack-osx-virtualhostx.md
LAMP stack on OSX with Homebrew, built-in Apache, multiple PHP versions, VirtualhostX optional

This guide shows how to set up a PHP and MySQL development environment using OSX's built-in Apache, using Homebrew to install necessary components. With this strategy, you can use different versions of PHP for certain virtual hosts.

VirtualHostX is a convenient way to manage development sites, but not required.

Install PHP and MySQL with Homebrew

brew update
brew install php56
brew install php56-mcrypt
brew install mysql
@tusharvikky
tusharvikky / README.md
Created June 26, 2015 22:55
App Engine CLI Linux

exec curl https://sdk.cloud.google.com | bash

restart shell exec -l $SHELL

maximize your shell and exec gcloud components list

install required components with gcloud components update

In my case: gcloud components update gae-go app

@tusharvikky
tusharvikky / puphpet-config.yaml
Created December 19, 2014 20:29
puphpet-config.yaml
---
vagrantfile-local:
vm:
box: puphpet/centos65-x64
box_url: puphpet/centos65-x64
hostname: ''
memory: '512'
cpus: '1'
chosen_provider: virtualbox
network:
@tusharvikky
tusharvikky / eOS-3rd-party-script.sh
Last active August 29, 2015 14:07
eOS/Ubuntu Essential packages Installer (14.04+)
#!/bin/bash
# Adding List of ppa
echo <<EOF
Adding PPA...
EOF
sudo add-apt-repository -y ppa:donadigo/power-installer
sudo add-apt-repository -y ppa:indicator-multiload/stable-daily
sudo add-apt-repository -y ppa:tomahawk/ppa
sudo add-apt-repository -y ppa:birdie-team/stable
@tusharvikky
tusharvikky / index.html
Last active August 29, 2015 14:06
Perfecting HTML5 Geolocation
<!DOCTYPE html>
<html>
<head>
<title>Perfecting HTML5 Geolocation</title>
<meta name="description" content="Perfecting HTML5 Geolocation">
<meta name="keywords" content="HTML5,CSS,JavaScript,GeoLocation">
<meta name="author" content="Tushar Deo <tushar.deo(at)lokconnect.com>">
<!-- Styles -->
<style type="text/css">
@tusharvikky
tusharvikky / ubuntu-13.10-brightness.md
Last active January 3, 2016 22:29
Fix: Ubuntu 13.10 Brightness Issue (MAX.) in Dell N4010
  1. Create the /usr/share/X11/xorg.conf.d/20-intel.conf file with root privlidges (from a terminal window):

Code:

sudo -i gedit /usr/share/X11/xorg.conf.d/20-intel.conf
  1. Copy/paste the following code:

Code:

@tusharvikky
tusharvikky / elementaryOS.md
Last active December 21, 2015 02:48
Elementary OS tools