Skip to content

Instantly share code, notes, and snippets.

@goutham2027
goutham2027 / install.sh
Created May 7, 2020 10:41 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`

Keybase proof

I hereby claim:

  • I am goutham2027 on github.
  • I am gouthampilla (https://keybase.io/gouthampilla) on keybase.
  • I have a public key ASCd_Buaefin4axGw3jEPDRZuJ2p0TseJhK4cqKH0mS4-Qo

To claim this, I am signing this object:

@goutham2027
goutham2027 / numbers_to_comma_separated.py
Created August 14, 2017 05:37
numbers to comma separated
import locale
locale.setlocale( locale.LC_ALL, '' )
# for currency use locale.currency
locale.format("%d", 1000000000, grouping=True)
# o/p: 1,000,000,000
def using_context_info(event, context):
info = {
'memory_limit_in_mb': context.memory_limit_in_mb,
'html_length': len(html)
}
return info
def length_of_html(event, context):
@goutham2027
goutham2027 / django_reversion.md
Last active July 12, 2016 17:40
using django reversion
pip install django-reversion

Add reversion to INSTALLED_APPS

INSTALLED_APPS = [
...
...
...
@goutham2027
goutham2027 / django_dev_env.md
Last active March 25, 2016 09:55
Settingup django dev environment

Django default shell is boring. To make it interactive we need ipython and shell_plus. shell_plus does auto imports.

pip install ipython
pip install django_extensions

Update in settings.py file

INSTALLED_APPS = [
@goutham2027
goutham2027 / rails_cheatsheet.md
Last active August 29, 2015 14:20
Ruby on Rails Cheat Sheet

Naming Convention

Rule Class name Filename
All models are singular Note note.rb
All controllers are plural Notes notes_controller.rb
View folder names are plural - notes/index.html.haml

Rails CLI commands

rails new <project-name> # create a new project