Skip to content

Instantly share code, notes, and snippets.

Avatar

Amit Asthana amitasthana

  • India
View GitHub Profile
@amitasthana
amitasthana / digitalocean-deploy-django
Created Nov 27, 2017 — forked from gustavohenrique/digitalocean-deploy-django
Steps to configure a django app on digitalocean.com
View digitalocean-deploy-django
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}
View txt
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCf1WC7nlzygwbB6Gt1EAYcHxGCP/Egy3EuqM1CKIHUMIfr73AC7MRqBIbJFzf3FPTmnpq5UTkmIoET1bEaMit1+Y78aaZnvehhizwemUEzJzehlVo7TQv9eiLLlwqNVB/IyYPsHyshoMl2ZDy/J2KXN/HFDdII+2O70ymGtu255N4/8G8xexxw6JMC+59PgQcMGiqgk+BcBWG4AYNN2mt11Kd1w+3VVwq5WPcBV5GAHFZE0FhNOLomQm2TkdLrq0llaNrqoeG7q5L1omRCAmWADKJqyJy5q5qY6SUVFppNmJnXtbT8U+RMNlq0DZ25la4Mvafgfqv2kmF9eCroaaBp OpenShift-Key
@amitasthana
amitasthana / Dockerfile
Created Apr 5, 2017 — forked from ebuildy/Dockerfile
Install Php 7 with MongoDB driver on Docker from Ubuntu trusty base image.
View Dockerfile
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 Dec 2, 2016 — 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”.
View exercise.md

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

acdegilmnoprstuw

such that the hash(the_string) is

910897038977002
View Download and Install MongoDB as Windows Service PowerShell Script
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)
{
View .htaccess
<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
View bongo.sh
LOADING=false
usage()
{
cat << EOF
usage: $0 [options] <DBNAME>
OPTIONS:
-h Show this help.
-l Load instead of export
View .htaccess
<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
View cltools.sh
#!/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
View gist:46b5ebd12f07f80c5710
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
# Send request via index.php
${1:this}
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d