Skip to content

Instantly share code, notes, and snippets.

View yashodhank's full-sized avatar
🎯
Manifesting

Yashodhan yashodhank

🎯
Manifesting
View GitHub Profile
@yashodhank
yashodhank / fb-conversion.liquid
Created July 30, 2016 18:25 — forked from chrisjhoughton/fb-conversion.liquid
Facebook's conversion pixel code, ready to go for Shopify with liquid variables. Change the `youraccountid` and add this to the "additional content and scripts" section of your checkout settings.
<!-- Facebook Conversion code -->
{% assign fb_pixel_id = 'yourpixelid' %}
<script>(function() {
var _fbq = window._fbq || (window._fbq = []);
if (!_fbq.loaded) {
var fbds = document.createElement('script');
fbds.async = true;
fbds.src = '//connect.facebook.net/en_US/fbds.js';
var s = document.getElementsByTagName('script')[0];
@yashodhank
yashodhank / whm.php
Created August 1, 2016 08:19 — forked from Zalvie/whm.php
<?php
# "server":{"host":"x","port":22,"username":"x","password":"x","path":"\\/root\\/back","type":"scp","email":"[email protected]"}
function backup($user) {
global $config;
$postdata = http_build_query(array('cpanel_jsonapi_user' => $user,
'cpanel_jsonapi_module' => 'Fileman',
@yashodhank
yashodhank / Unattended Encrypted Incremental Backup to Amazon S3.md
Created August 3, 2016 12:33 — forked from janikvonrotz/Unattended Encrypted Incremental Backup to Amazon S3.md
Ubuntu: Unattended Encrypted Incremental Backup to Amazon S3#AmazonAWS#Markdown

Introduction

For this task we are going to configure a duplicity script wrapper. Unregarded of the installation instructions it's expected that you have already signed up for an Amazon account and know how to use their services.

Requirements

  • Ubuntu server
  • duplicity, Git, GnuPG
  • MySQL
@yashodhank
yashodhank / aws-vesta-s3.md
Created August 4, 2016 05:26 — forked from bitkidd/aws-vesta-s3.md
AWS S3 backup for Vesta

Before doing all this you have to create a bucket in your AWS console. Or just use AWS cli tool in order to create one.

  • Install pip (if not installed already):
$ curl -O https://bootstrap.pypa.io/get-pip.py
  • Install AWS cli tool:
$ sudo pip install awscli
@yashodhank
yashodhank / local-vagrant-dev-serv
Created August 4, 2016 06:38 — forked from maliMirkec/local-vagrant-dev-serv
Local vagrant developement server - Vesta, PhalconPHP, Git, NodeJs, Bower, Grunt, Gulp, Yeoman
// general update
sudo apt-get update
// general upgrade
sudo apt-get upgrade
// install midnight commander
sudo apt-get install mc
// install git

Required

Ubuntu 14.04+ LTS

Update OS packages

sudo apt-get update && sudo apt-get -y upgrade

VestaCP

Installation

Install parameters as follows:

  • Web Server > Nginx + Apache > Yes

Using Let’s Encrypt (public beta) with Vesta Control Panel

Install the Let’s Encrypt ACME Client

Follow the instructions at https://letsencrypt.readthedocs.org. Assuming you installed as root, the client will be now be located at /root/letsencrypt.

Request a Certificate

By default:

  • The beta client will use the test infrastructure to issue a certificate, and thus won’t be trusted by browsers;
  • The client uses a temporary web server to authenticate the host which will conflict with the existing web server(s);
@yashodhank
yashodhank / .htaccess
Last active February 12, 2017 04:26 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@yashodhank
yashodhank / gitdeployment.md
Created August 9, 2016 05:12 — forked from rdsimes/gitdeployment.md
Setting up git deployment on windows

Continuous deployment with git on Windows

These are some notes to accompany my talk on continuous deployment for ASP.NET with git. Here you'll find all the tools, commands & setup that I mentioned.

I've tried a bunch of different methods of deploying, and find this to be the simplest, easiest way to set up continuous deploy for ASP.NET while still being powerfull and flexible.

Firstly, I like to ensure I have the following tools installed, to make life on windows a bit less painful: