Skip to content

Instantly share code, notes, and snippets.

View amitasthana's full-sized avatar

Amit Asthana amitasthana

  • India
View GitHub Profile
@amitasthana
amitasthana / digitalocean-deploy-django
Created November 27, 2017 07:16 — forked from gustavohenrique/digitalocean-deploy-django
Steps to configure a django app on digitalocean.com
deploy django app on digitalocean
=================================
# Packages
sudo apt-get install python-pip python-dev python-virtualenv supervisor nginx
# Create dirs
mkdir -p /webapps/my-project/{logs,run}
@amitasthana
amitasthana / Dockerfile
Created April 5, 2017 04:38 — forked from ebuildy/Dockerfile
Install Php 7 with MongoDB driver on Docker from Ubuntu trusty base image.
FROM ubuntu:trusty
ENV HOME /root
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
RUN add-apt-repository ppa:ondrej/php && \
apt-get update
@amitasthana
amitasthana / exercise.md
Created December 2, 2016 15:07 — forked from wo0dyn/exercise.md
Find a 9 letter string of characters that contains only letters from “acdegilmnoprstuw” such that the hash(the_string) is “910897038977002”.

Find a 9 letter string of characters that contains only letters from

acdegilmnoprstuw

such that the hash(the_string) is

910897038977002
Set-ExecutionPolicy RemoteSigned
$mongoDbPath = "C:\MongoDB"
$mongoDbConfigPath = "$mongoDbPath\mongod.cfg"
$url = "http://downloads.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.4.9.zip"
$zipFile = "$mongoDbPath\mongo.zip"
$unzippedFolderContent ="$mongoDbPath\mongodb-win32-x86_64-2008plus-2.4.9"
if ((Test-Path -path $mongoDbPath) -eq $True)
{
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
LOADING=false
usage()
{
cat << EOF
usage: $0 [options] <DBNAME>
OPTIONS:
-h Show this help.
-l Load instead of export
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
#!/bin/sh
##
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
#
# This script is originally from http://jsdelfino.blogspot.com.au/2012/08/autoconf-and-automake-on-mac-os-x.html
#
export build=~/devtools # or wherever you'd like to build
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
# Send request via index.php
${1:this}
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#
# @author Jonathon byrd
#
############################################################
# first things first, set your iptables for a web server. If you jack these
# up you don't want to have to re-install your os after doing much more.
# @see http://www.thegeekstuff.com/2011/06/iptables-rules-examples/
# and
# @see https://help.ubuntu.com/community/IptablesHowTo