Wednesday, November 15, 2017

spyder python editor

spyder installed through anaconda

autocompletion  works in the spyder console ( )
but doesn't work totally in the editor part  ( )

https://stackoverflow.com/questions/42777430/why-autocompletion-options-in-spyder-3-1-are-not-fully-working-in-the-editor/42789884#42789884

https://pythonhosted.org/spyder/overview.html

--------- to have autocompletion work with Python3 on Mac (anaconda install)
pip install rope_py3k
.

Saturday, July 1, 2017

jackson


JSON parser

codehaus   Jackson 1
fasterxml  Jackson 2


Friday, June 30, 2017

Solr 6 and above



  • if you want to use a static schema.xml, add this in your solrconfig

< schemaFactory class="ClassicIndexSchemaFactory"/ >



Thursday, June 22, 2017

alpine in a docker container

Take the case where you loaded a docker image from somebody else or from a repository and a user was specified in the dockerfile during the docker image creation. Now, you want to install something in this alpine container and need root privilege to do this.

you can check the user field in the image dockerfile by doing
docker inspect  solr:6.6.0-alpine 
If the value of the field "user" is something else than empty or root, you won't have root access to the container to install things. Either you can execute something in the existing container as "root" user:
docker exec --user root -it 008d1946ddf8 bash
Or you can generate a new container from the docker image with the root user .
docker run -it --user root solr:6.6.0-alpine
If you commit this new container, the newly generated image will have the "root" user in its dockerfile.

bash-4.3#   apk update
bash-4.3#   apk add curl


Wednesday, May 31, 2017

stackoverflow

  • user:mine or user:me (or any user id) returns only your posts (or only the posts from whichever user whose id you entered)
  • infavorites:mine (or any user id) returns only questions that you (or the user whose id you entered) have favorited.
  • intags:mine returns only posts that appear in tags you have marked as favorite. (If you don't have any tags, this operator does nothing. For better results, update your preferences.)

Tuesday, April 18, 2017

HTTP


  • get the HTTP header
    • wget -S http://www.cnn.com

Saturday, April 8, 2017

github



  • git config --global user.email "whatever@yahoo.com"   (your github email, used to identified the committer)
  • git config --global user.name "blah blah"
  • git add toto.txt
  • git commit -am"my test"
  • git push

  • to see commit graph
    • "insight" / "network"

  • [old way] About keys: generate keys on each machine from which you want to clone, and add them in gitlab
ssh-keygen -t rsa -C "an.lfl@sony.com"
cat ~/.ssh/id_rsa.pub
add the output of the cat as a new machine key in gitlab in: gitlab.leguide.com/profile/keys 
then you will need to do this on the client machine:
l@al:~/l/catalogs$ git config --global user.email "toto@toto.com"
l@al:~/l/catalogs$ git config --global user.name "Bob Doe"
l@al:~/l/catalogs$ git config  -l       (to check what's in)




Wednesday, March 29, 2017

tools


Saturday, January 21, 2017

USB external drive

If you have an USB external disk:

  • if it is FAT: 2GB max file transfer
  • NTFS: don"t support unix privileges
  • EXT4: cannot see it from Windows