Skip to content

Instantly share code, notes, and snippets.

View yumyum-web's full-sized avatar
📚
Studying ± Tinkering

Yumeth yumyum-web

📚
Studying ± Tinkering
  • Ja-Ela, Sri Lanka
  • 15:54 (UTC +05:30)
View GitHub Profile
@josemmo
josemmo / repair-mysql-data.ps1
Created August 28, 2020 18:48
Repair MySQL data directory (for XAMPP)
# Based on this answer: https://stackoverflow.com/a/61859561/1956278
# Backup old data
Rename-Item -Path "./data" -NewName "./data_old"
# Create new data directory
Copy-Item -Path "./backup" -Destination "./data" -Recurse
Remove-Item "./data/test" -Recurse
$dbPaths = Get-ChildItem -Path "./data_old" -Exclude ('mysql', 'performance_schema', 'phpmyadmin') -Recurse -Directory
Copy-Item -Path $dbPaths.FullName -Destination "./data" -Recurse
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active May 4, 2026 18:44
Conventional Commits Cheatsheet
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 30, 2026 19:49
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@sligodave
sligodave / gist:6539531
Last active November 23, 2023 07:29
Quick example of creating, using and deleting a temp file in python
import os
import tempfile
file_descriptor, file_path = tempfile.mkstemp(suffix='.tmp')
# You can convert the low level file_descriptor to a normal open file using fdopen
with os.fdopen(file_descriptor, 'w') as open_file:
open_file.write('hello')