Skip to content

Instantly share code, notes, and snippets.

View avinash-mishra's full-sized avatar
🎯
Focusing

Avinash avinash-mishra

🎯
Focusing
View GitHub Profile
@trashvin
trashvin / connect.py
Created January 19, 2020 15:28
Connect to IBM DB2 instance from Jupyter Notebook using Python
import ibm_db
dsn_hostname = "dashdb-txn-sbox-yp-dal09-04.services.dal.bluemix.net" # e.g.: "dashdb-txn-sbox-yp-dal09-04.services.dal.bluemix.net"
dsn_uid = "121a1we" # e.g. "abc12345"
dsn_pwd = "xfgfdg121212" # e.g. "7dBZ3wWt9XN6$o0J"
dsn_driver = "{IBM DB2 ODBC DRIVER}"
dsn_database = "BLUDB" # e.g. "BLUDB"
dsn_port = "50000" # e.g. "50000"
dsn_protocol = "TCPIP" # i.e. "TCPIP"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sundowndev
sundowndev / GoogleDorking.md
Last active April 19, 2024 11:58
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@jonlabelle
jonlabelle / docker_compose_cheatsheet.md
Last active April 16, 2024 17:29
Docker Compose Cheatsheet
@tsuemura
tsuemura / ja-SR.js
Last active November 16, 2019 06:52
CodeceptJS神龍語翻訳ファイル
module.exports = {
I: '我が名は神龍',
actions: {
waitForElement: '要素が表示されるまで待ってやろう',
waitForClickable: 'クリック可能になるまで待ってやろう',
waitForVisible: '要素が見えるようになるまで待ってやろう',
waitForText: 'テキストが表示されるまで待ってやろう',
refresh: 'ページを更新してやろう',
amOnPage: 'URLにアクセスしてやろう',
click: 'クリックしてやろう',
@bradtraversy
bradtraversy / pipenv_cheat_sheet.md
Last active April 1, 2024 03:09
Pipenv cheat sheet for common commands

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell
@clbarnes
clbarnes / install.sh
Last active October 29, 2022 12:21
Git hook installation script
#!/bin/bash
# Adapted from https://gist.github.com/tilap/0590e78c9cfd8f6548f5
# Basic script to set custom project hook and share it with other developers
#
# cd [path-of-the-script]
# . install.sh
#
# Folders usecase
@GhostofGoes
GhostofGoes / .gitignore
Created October 4, 2018 04:29
Basic .gitignore template for Python projects
# Editors
.vscode/
.idea/
# Vagrant
.vagrant/
# Mac/OSX
.DS_Store
@avinash-mishra
avinash-mishra / AWS-CLI.md
Last active September 10, 2018 08:02 — forked from stevenyap/AWS-CLI.md
AWS S3 Command Line

S3 Syncing

# sync from bucket to local
aws s3 sync <bucket> <target_folder> <options>
aws s3 sync s3://mybucket . --acl public-read

aws s3 sync --region ap-northeast-1 s3://[移動元バケット名] s3://[移動先バケット名]
@vepetkov
vepetkov / hdfs_pq_access.py
Created September 4, 2018 11:10
Python HDFS + Parquet (hdfs3, PyArrow + libhdfs, HdfsCLI + Knox)
##################################################################
## Native hdfs access (only on the cluster)
# conda install -c conda-forge libhdfs3=2.3.0=1 hdfs3 --yes
import hdfs3
import pandas as pd
nameNodeHost = 'hadoopnn1.localdomain'
nameNodeIPCPort = 8020
hdfs = hdfs3.HDFileSystem(nameNodeHost, port=nameNodeIPCPort)