Skip to content

Instantly share code, notes, and snippets.

View lfalanga's full-sized avatar
🏠
Working from home.

Leandro Falanga lfalanga

🏠
Working from home.
  • Buenos Aires, Argentina.
View GitHub Profile
@lfalanga
lfalanga / git-clearHistory
Created February 14, 2025 17:58 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git
# Defines all Languages known to GitHub.
#
# type - Either data, programming, markup, prose, or nil
# aliases - An Array of additional aliases (implicitly
# includes name.downcase)
# ace_mode - A String name of the Ace Mode used for highlighting whenever
# a file is edited. This must match one of the filenames in http://git.io/3XO_Cg.
# Use "text" if a mode does not exist.
# wrap - Boolean wrap to enable line wrapping (default: false)
# extensions - An Array of associated extensions (the first one is
# Getting Python default distro installation directories #########
sosiegoless@sosiegonux:~$ python
Python 3.8.1 (default, Jan 29 2020, 22:56:15)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.path)
['', '/usr/local/lib/python38.zip', '/usr/local/lib/python3.8', '/usr/local/lib/python3.8/lib-dynload', '/home/sosiegoless/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/site-packages']
>>>
sosiegoless@sosiegonux:~$
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML Page Title</title>
<style>
</style>
</head>
<body>
# Give user write permissions to a folder
sudo chown -R testuser:testuser /var/www/test/public_html
# Install MySQL Server
sudo apt-get update
sudo apt-get install mysql-server
# Launch the MySQL Secure Installation
# This utility prompts you to define the mysql root password and other
# security-related options, including removing remote access to the root user
# and setting the root password.
sudo mysql_secure_installation utility
# Example 1: Using recursion to print out a list
lista = ["elemento1n1", "elemento2n1", "elemento3n1",
["elemento1n2", "elemento2n2", "elemento3n2",
["elemento1n3", "elemento2n3", "elemento3n3"]
]
]
# Imprimimos la lista
def recorrer_lista(item):
for x in item:
from tkinter import *
root = Tk()
topFrame = Frame(root)
topFrame.pack()
bottomFrame = Frame(root)
bottomFrame.pack(side=BOTTOM)
button1 = Button(topFrame, text='Button 1', fg='red')
from tkinter import *
from tkinter import messagebox
root = Tk()
root.title("Tarea POO")
root.resizable(FALSE, FALSE)
topFrame = Frame(root)
topFrame.pack()
bottomFrame = Frame(root)
from tkinter import *
from tkinter import messagebox
root = Tk()
root.title("Tarea POO")
root.resizable(FALSE, FALSE)
topFrame = Frame(root)
topFrame.pack()
bottomFrame = Frame(root)