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 / txt
Created October 5, 2017 07:57
rsa
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCf1WC7nlzygwbB6Gt1EAYcHxGCP/Egy3EuqM1CKIHUMIfr73AC7MRqBIbJFzf3FPTmnpq5UTkmIoET1bEaMit1+Y78aaZnvehhizwemUEzJzehlVo7TQv9eiLLlwqNVB/IyYPsHyshoMl2ZDy/J2KXN/HFDdII+2O70ymGtu255N4/8G8xexxw6JMC+59PgQcMGiqgk+BcBWG4AYNN2mt11Kd1w+3VVwq5WPcBV5GAHFZE0FhNOLomQm2TkdLrq0llaNrqoeG7q5L1omRCAmWADKJqyJy5q5qY6SUVFppNmJnXtbT8U+RMNlq0DZ25la4Mvafgfqv2kmF9eCroaaBp OpenShift-Key
@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