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 / letsencrypt_2017.md
Created February 27, 2018 13:26 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

@tusharvikky
tusharvikky / Envoy.blade.php
Created June 28, 2016 18:54
Laravel Envoy Task Runner
@servers(['staging' => 'root@192.168.0.99', 'production' => 'root@192.168.0.100'])
<?php
$app_name = 'l5eka';
$app_path = '/var/www/vhosts/'.$app_name;
$repo = 'https://github.com/vedovelli/l5eka';
$branch = 'aula4';
$github_token = ''; // GitHub OAuth token
$server_name = '192.168.0.99'; // IP ou domínio válido. Usado no nginx
@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<erika@do.co>
# @author Bjørn Johansen <post@bjornjohansen.no>
# 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 / luna.md
Created August 12, 2013 10:54 — forked from jensk/luna.md
# Initial setup
git clone -o framework -b develop https://github.com/laravel/laravel.git project-name
cd project-name
git checkout --orphan master
git commit -m "Initial commit"
# Pulling changes
git fetch framework
git merge --squash -m "Upgrade Laravel" framework/develop
# Fix merge conflicts if any and commit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Dynamic Gist Embedding</title>
</head>
<body>
<p>
<?php
/**
* Ranking Library
* contains alogrithms for story ranking
* Basically a PHP Implementation of reddits algorithms
*
* @author Lucas Nolte <lnolte@i.biz>
* @since 0.1
* @package Polska Wiadomosc
* @subpackage Libraries
@tusharvikky
tusharvikky / snippet.xml
Created October 21, 2012 15:01 — forked from JeffreyWay/snippet.xml
Laravel Resource - Sublime Text 2 Snippet
<snippet>
<content><![CDATA[
// ${1} Resource
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index'));
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show'));
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new'));
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit'));
Route::post('${1}s', '${1}s@create');
Route::put('${1}s/(:any)', '${1}s@update');
Route::delete('${1}s/(:any)', '${1}s@destroy');