Skip to content

Instantly share code, notes, and snippets.

Anand anandpathaksharma

Block or report user

Report or block anandpathaksharma

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anandpathaksharma
anandpathaksharma / self-signed-certificate-with-custom-ca.md
Last active Jun 26, 2019 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA for use with DNS/Domain Names AND IP addresses for Local Development
View self-signed-certificate-with-custom-ca.md

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@anandpathaksharma
anandpathaksharma / _osx-10.11_postfix-php-drupal.md
Last active Jul 16, 2017
Postfix+PHP+Drupal on OSX 10.11.11 (El Capitan) for Software Developers (a.k.a software development and testing).
View _osx-10.11_postfix-php-drupal.md

How to get mail sending to work on OSX for development purposes ONLY.

OSX comes with Postfix pre-installed. All that needs to be done is to configure it AND PHP. There are a couple of configuration files involved. Each file that needs to be adjusted is attached to this gist along with the relevant configuration options and settings.

You will start by editing the Postfix config file located at: /private/etc/postfix/main.cf. You will then edit your PHP config file (php.ini) which, for me I installed via macports and was thus located at: /opt/local/etc/php56/php.ini.

These are the two pages that I used to get things working:

  1. How to send emails from localhost (MAC OS X El Capitan)
@anandpathaksharma
anandpathaksharma / README.md
Created Jan 7, 2016 — forked from nichtich/README.md
How to automatically deploy from GitHub
View README.md

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
    • the Apache user is named www-data (may be apache on other systems)
View default.vcl
#varnish cache server configuration file, used with drupal 6 and --apache-- nginx
#inspiration from https://wiki.fourkitchens.com/display/PF/Configure+Varnish+for+Pressflow
#with change from obj to beresp of
#http://www.mail-archive.com/varnish-misc@projects.linpro.no/msg02911.html
#and cache HIT or MISS header from somewhere else
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 600s;
.first_byte_timeout = 600s;
View .zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="anand"
# Example aliases
View anand.zsh-theme
autoload -U promptinit
promptinit
PROMPT='%{$fg_bold[yellow]%}%n%{$fg_no_bold[white]%}@%{$fg_no_bold[green]%}%m %{$fg_bold[yellow]%}%~ %{$fg_no_bold[blue]%}$(git_prompt_info)%{$fg_no_bold[blue]%}
%{$fg_bold[yellow]%}%(#,#,$)%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="
git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
@anandpathaksharma
anandpathaksharma / compile-on-ubuntu_apache.html
Last active Aug 29, 2015
Compiling on Ubuntu from Scratch: Apache
View compile-on-ubuntu_apache.html
<head>
<style>
body {
color: #444;
font-size: 1.1em;
margin: 0 auto;
text-align: left;
max-width: 75%;
padding: 0 10px;
font-family: Georgia, "Times New Roman", serif; }
@anandpathaksharma
anandpathaksharma / heidi_sql-ssh_tunnel-putty_plink.md
Created Mar 26, 2014
Enable SSH Tunnel for a connection in Heidi SQL using PLink.exe from PuTTY
View heidi_sql-ssh_tunnel-putty_plink.md
View aliases.sh
#!/bin/sh
# BASH PROMPT COMBO FROM CYGWIN
# PS1="\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ "
#shopt -s expand_aliases
# Bash
alias l="ls -lhaX --color=always"
alias ll="ls -lhaX --color=always | grep '^d' && ls -lhaX --color=always | grep '^-' && ls -lhaX --color=always | grep '^l' "
alias lst="stat -c '%A %a %n' *"
@anandpathaksharma
anandpathaksharma / drupal-patch-strategy.md
Last active Dec 30, 2015
A full and verbose description of how to create patches and interdiffs for submission to the Drupal issue queue.
View drupal-patch-strategy.md

Drupal Patch Strategy:

Patches

  1. make changes then make patch BEFORE COMMITTING CHANGES
  • $ git diff > [project-name]-[project-version].[description].[issue-number]-[comment-number].patch
  • doesn't work when adding or deleting files
  1. you've made changes that INCLUDE adding/deleting files, BUT NOT COMMITTED
  • $ git [add|rm] ...
You can’t perform that action at this time.