Skip to content

Instantly share code, notes, and snippets.

@jurandysoares
jurandysoares / ipython_to_file.md
Created January 30, 2021 11:44 — forked from awesomebytes/ipython_to_file.md
Save iPython session to a python file as code

Save an iPython session commands/code to a file

You must use the magic method %save:

In [1]: %save?
Type:       Magic function
String Form:<bound method CodeMagics.save of <IPython.core.magics.code.CodeMagics object at 0x7fb5d25bb1d0>>
Namespace:  IPython internal
File: /usr/lib/python2.7/dist-packages/IPython/core/magics/code.py
@jurandysoares
jurandysoares / path.md
Last active February 21, 2021 17:12 — forked from nex3/path.md

PATH

Tradução de: https://gist.github.com/nex3/c395b2f8fd4b02068be37c961301caa7

O PATH é um conceito importante ao trabalhar na linha de comando. É uma lista de diretórios que informam ao seu sistema operacional onde procurar programas, então que você pode apenas escrever script em vez de /home/me/bin/script ou C:\Usuários\Me\bin\script. Mas sistemas operacionais diferentes têm maneiras diferentes de adicionar um novo diretório a ele:

@jurandysoares
jurandysoares / LXD-folha-resumo.md
Last active August 10, 2021 21:25 — forked from berndbausch/LXD-cheat-sheet.md
LXD cheat sheet
@jurandysoares
jurandysoares / split.zsh
Created November 7, 2022 10:44 — forked from mattmc3/split.zsh.md
ZSH - split string into array
str=part1/part2/part3
# part1
echo ${str%%/*}
# part1/part2
echo ${str%/*}
# part2
echo ${${str%/*}#*/}
# part2/part3
echo ${str#*/}
# part3