Skip to content

Instantly share code, notes, and snippets.

View lucianmarin's full-sized avatar
🐞

Lucian Marin lucianmarin

🐞
View GitHub Profile
@huytd
huytd / wordle.md
Last active May 2, 2024 12:13
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@motorailgun
motorailgun / idea.md
Last active November 16, 2023 03:13
Installing Windows and Linux into the same partition

Installing Windows and Linux into the same partition

But WHY?

There was a reddit post about installing Arch on NTFS3 partition. Since Windows and Linux doesn't have directories with same names under the /(C:\), I thought it's possible, and turned out it was actually possible.
If you are not familiar to Linux, for example you've searched on Google "how to dualboot Linux and Windos" or brbrbr... you mustn't try this. This is not practical.

Pre-requirements

  • UEFI system
  • Any Linux live-boot CD/DVD/USB... with Linux kernel newer than 5.15
  • Windows installer USB
@MineRobber9000
MineRobber9000 / donotuse3.py
Last active February 8, 2024 12:48
How to NEVER use lambdas - Python 3 edition
###########################################################
# How to NEVER use lambdas. An inneficient and yet educa- #
# tonal [sic] guide to the proper misuse of the lambda #
# construct in Python 3.x. [DO NOT USE ANY OF THIS EVER] #
# original by (and apologies to): e000 (13/6/11) #
# now in Python 3 courtesy of: khuxkm (17/9/20) #
###########################################################
## Part 1. Basic LAMBDA Introduction ##
# If you're reading this, you've probably already read e000's
@rudolfschmidt
rudolfschmidt / free-3-letter-domains.sh
Created June 2, 2020 21:04
Check Free 3 Letter Domains
#!/usr/bin/env bash
array=( a b c d e f g h i j k l m n o p q r s t u v w x y z )
for a in "${array[@]}"
do
for b in "${array[@]}"
do
for c in "${array[@]}"
do
@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
@dvf
dvf / change-codec.md
Last active May 1, 2024 19:52
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@tylerburdsall
tylerburdsall / asynchronous_example.py
Last active December 23, 2022 19:34
Example showing asynchronous HTTP request with Python 3.5.0 + asyncio
import requests
import asyncio
from concurrent.futures import ThreadPoolExecutor
from timeit import default_timer
START_TIME = default_timer()
def fetch(session, csv):
base_url = "https://people.sc.fsu.edu/~jburkardt/data/csv/"
with session.get(base_url + csv) as response:
@JialunC
JialunC / example.py
Last active October 24, 2018 17:32
A simple async code
import asyncio
async def print_something_twice():
print('Hello World')
await asyncio.sleep(1)
print('Hello to you three')
async def print_something():
print('Hello to you two')
@Pulimet
Pulimet / AdbCommands
Last active May 2, 2024 05:27
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@seanbehan
seanbehan / app.py
Last active March 13, 2023 04:55
Flask with Django ORM
'''
Run the following commands (bc. gists don't allow directories)
pip install flask django dj-database-url psycopg2
mkdir -p app/migrations
touch app/__init__.py app/migrations/__init__.py
mv models.py app/
python manage.py makemigrations
python manage.py migrate