Skip to content

Instantly share code, notes, and snippets.

View tbotalla's full-sized avatar
👷‍♂️

Tomas Enrique Botalla tbotalla

👷‍♂️
View GitHub Profile

See git help of a specyfic command

git help stash

Delete old already pushed commits

git reset --hard HEAD~x // Elimina los ultimos x+1 commits
git push -f
@tbotalla
tbotalla / Pandas Python Cheatsheet
Last active September 23, 2018 23:17
Gist de Referencia con lineas utiles de código al usar Pandas para analisis exploratorio de datos
# Convertir columna a string
total_rows['ColumnID'] = total_rows['ColumnID'].astype(str)
# Eliminar filas cuyo valor para la columna A son nan
df.dropna(subset=['A'])
# Distribucion de valores para una cierta columna
events['city'].value_counts()
# Chequear si una columna tiene algun valor null
@miglen
miglen / linux-networking-tools.md
Last active July 19, 2024 23:39
Linux networking tools

List of Linux networking tools

netstat (ss)

Displays contents of /proc/net files. It works with the Linux Network Subsystem, it will tell you what the status of ports are ie. open, closed, waiting, masquerade connections. It will also display various other things. It has many different options. Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.

Sample output:

Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)    
tcp4 0 0 127.0.0.1.62132 127.0.0.1.http ESTABLISHED
@Faheetah
Faheetah / Jenkinsfile.groovy
Last active June 17, 2024 15:05
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@subfuzion
subfuzion / curl.md
Last active July 18, 2024 17:12
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@ed-flanagan
ed-flanagan / Popcorn-Time.desktop
Last active October 31, 2020 10:10
Gnome Popcorn Time application launcher
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Popcorn Time
Name[en_US]=Popcorn Time
GenericName=BitTorrent Stream Player
GenericName[en_US]=BitTorrent Stream Player
Comment=Run the Popcorn Time application
Comment[en_US]=Run the Popcorn Time application
Type=Application
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active July 2, 2024 00:02
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@hofmannsven
hofmannsven / README.md
Last active July 16, 2024 01:30
Git CLI Cheatsheet
@banaslee
banaslee / XGH - en.txt
Last active July 17, 2024 16:13
eXtreme Go-Horse Process
eXtreme Go Horse (XGH) Process
Source: http://gohorseprocess.wordpress.com
1. I think therefore it's not XGH.
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster.
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster.
XGH is faster than any development process you know (see Axiom 14).