Skip to content

Instantly share code, notes, and snippets.

View ashishmohite's full-sized avatar
😇

Ashish Mohite ashishmohite

😇
View GitHub Profile
@ankitsinghaniyaz
ankitsinghaniyaz / webdev.yaml
Created May 21, 2020 19:13
Ansible file to setup a web develoipment environment in an Ubuntu(ish) OS
# Set up a development environment on an Ubuntu flavored linux distribution
# install and sets up:
# rbenv, nvm, mysql, postgres, redis
# vscode, slack, docker, chormium, tilix, heroku, postman, beekeeper, skype, kazam, peek and more
# setup an rsa key
# Usage:
# install ansible 2.7+ - latest
## sudo apt-add-repository ppa:ansible/ansible && sudo apt update && sudo apt install ansible
# run the playbook:
## ansible-playbook webdev.yaml -K -e "email=<[email protected]>"
@toshke
toshke / gitalias.sh
Last active April 16, 2020 08:38
Useful git aliases push pull rebase master upstream
git config --global alias.plom '!git pull origin master'
git config --global alias.psom '!git push origin master'
git config --global alias.plod '!git pull origin develop'
git config --global alias.psod '!git push origin develop'
git config --global alias.plum '!git pull upstream master'
git config --global alias.plud '!git pull upstream develop'
git config --global alias.plrum '!git pull --rebase upstream master'
git config --global alias.plrom '!git pull --rebase origin master'
@maxdbn
maxdbn / 000_packages.config
Last active February 1, 2023 07:57
Install nginx with headers-more module on Elastic Beanstalk, Tested on: 64bit Amazon Linux 2016.09 v2.3.0 running Ruby 2.3 (Puma)
commands:
00_install_dev_tools:
command: "yum groupinstall 'Development Tools' -y"
packages:
yum:
git: []
htop: []
geoip: []
geoip-devel: []
gcc-c++: []
@justdoit0823
justdoit0823 / golang_essence.md
Last active August 22, 2018 07:08
Golang essence.

Code organization

Overview

  • Go programmers typically keep all their Go code in a single workspace.
  • A workspace contains many version control repositories (managed by Git, for example).
  • Each repository contains one or more packages.
@philipstanislaus
philipstanislaus / sane-caching.nginx.conf
Last active November 27, 2025 12:07
Sample Nginx config with sane caching settings for modern web development
# Sample Nginx config with sane caching settings for modern web development
#
# Motivation:
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools.
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh
# and juicy version of your assets available.
# At some point, however, you want to show your work to testers, your boss or your client.
# After you implemented and deployed their feedback, they reload the testing page – and report
# the exact same issues as before! What happened? Of course, they did not have developer tools
# open, and of course, they did not empty their caches before navigating to your site.
@arikfr
arikfr / README.md
Last active August 26, 2024 19:27
Redash Query Export Tool

Setup

$ pip install click requests

Usage

$ python query_export.py --redash-url "https://app.redash.io/" --api-key ""
@soheilhy
soheilhy / nginxproxy.md
Last active July 5, 2025 15:29
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@baali
baali / dlAttachments.py
Created May 8, 2012 08:32
Python script to download all gmail attachments.
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail
# Make sure you have IMAP enabled in your gmail settings.
# Right now it won't download same file name twice even if their contents are different.
import email
import getpass, imaplib
import os
import sys
detach_dir = '.'
@mislav
mislav / pagination.md
Created October 12, 2010 17:20
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o