Skip to content

Instantly share code, notes, and snippets.

View shreejay's full-sized avatar

Shreejay Nair shreejay

View GitHub Profile
@IamAdiSri
IamAdiSri / Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Last active May 9, 2022 22:08 — forked from evansneath/Python3 Virtualenv Setup
Setting up and using Python3, Pip3, Virtualenv (for Python3) and Virtualenvwrapper (for Python3)
First install pip for Python2. Download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py
$ cd <download location>
$ sudo -H python ./get-pip.py
Installing pip also installs Python3
To run Python3
$ python3
Install pip3 by just executing the same file as in the step above, but this time using Python3
$ sudo -H python3 ./get-pip.py
@jconwell
jconwell / README
Created July 14, 2015 23:25
Remotly Debug ElasticSearch in IntelliJ
Pretty simple once you know how.
Step 1: In IntelliJ, create a new remote debug configuration. Name it something ElasticSearchy. All of the default values should be fine. The only thing you need to change is the Host value. If ElasticSearch is gonna be running locally, just use "localhost", otherwise use the IP address of the remote machine ElasticSearch is gonna run on
Step 2: When starting ElasticSearch, just add a -D argument with the standard java remote debug values like so:
bin/elasticsearch -D "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
ElasticSearch will start and if suspend is set to 'y', it'll pause execution until you have attached the IntelliJ debugger.
Step 3: In IntilliJ, run the remote debug configuration you created in step 1.
@nickautomatic
nickautomatic / cmder.md
Last active September 20, 2023 13:59
Setting up Cmder to use bash by default

Set up cmder to use msysgit / bash by default

  • Install cmder_mini (msysgit is already installed, so no need for full version)
  • In Cmder, open settings: Win + Alt + P
  • Under Startup > Tasks, add a task called {bash} with the following settings:
    • Task parameters (set icon):
      • For Cmder icon: /icon "%CMDER_ROOT%\cmder.exe"
      • For Git icon: /icon "C:\Program Files (x86)\Git\etc\git.ico"
    • Commands (open Git's bash shell):
  • "C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%
@staltz
staltz / introrx.md
Last active November 19, 2024 18:00
The introduction to Reactive Programming you've been missing
@svartalf
svartalf / elasticsearch_ru_stemming_and_morphology.py
Last active January 13, 2022 12:21
Example of the ElasticSearch configuration for russian stemming and morphology
requests.put('http://localhost:9200/site/', data=json.dumps({
'settings': {
'analysis': {
'analyzer': {
'ru': {
'type': 'custom',
'tokenizer': 'standard',
"filter": ['lowercase', 'russian_morphology', 'english_morphology', 'ru_stopwords'],
},
},
#!/bin/sh
echo "\n --- delete index"
curl -X DELETE 'http://localhost:9200/'
echo "\n --- create index and put mapping into place"
curl -X POST 'http://localhost:9200/myindex/' -d '{
"mappings" : {
"person" : {
"properties" : {