Skip to content

Instantly share code, notes, and snippets.

@Tofull
Last active April 26, 2017 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tofull/d91b7df06142eef65f6702553592d3a5 to your computer and use it in GitHub Desktop.
Save Tofull/d91b7df06142eef65f6702553592d3a5 to your computer and use it in GitHub Desktop.
usefull commands for some utilities

Convert markdown to pdf with customized marges

  pandoc -V geometry:margin=1in -o CR_12012017.pdf CR_12012017.md

atom : Save settings (package only)

  apm list --installed --bare > packages.list  
  apm install --packages-file packages.list

atom : Proxy settings

  apm config set proxy "http://10.0.4.2:3128"  
  apm config set https_proxy "http://10.0.4.2:3128"
  apm config set strict-ssl false

webtools

  sudo apt-get install siege
  siege -b 127.0.0.1

Communicate between two machines using tcp protocol

Open the port tcp 1234 with nc :

nc -l 1234

Send docker swarm output to the piensg018 machine :

    docker swarm join-token manager | nc piensg018 1234

Copy file through the network :

  scp filename host:

Be carefull to not forget the column otherwise the file will be copied into the local folder... You can specify the remote folder after the column. The default location is the home repository.

Refresh a command to avoir multiple enter tap

Put watch before the command :

  watch docker stack ps metrics

publish npm package following github tag

npm version 0.0.4 && npm publish && git push --tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment