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

Tuesday, December 20, 2016

Python

>>> import form_utils
>>> form_utils.__file__
'/data1/django/lib/python2.6/site-packages/form_utils/__init__.pyc'
>>> globals()
{'__builtins__': , 'functools': , '__package__': None, '__name__': '__main__', 'os': , '__doc__': None}

print(globals())

- commands
    find . -name \*.pyc -delete

- run simple code from the command line
   python3 -c 'import apache_beam; print(apache_beam.__version__)'

------  python3
apt-get install python3

warning: don't change symbolic links in /usr/bin (/usr/bin/python and /usr/bin/python-config). Otherwise apt-get and other scripts don't work anymore.
Rather, add an alias in your .bashrc
alias python=python3