Skip to content

Instantly share code, notes, and snippets.

View hakkm's full-sized avatar
🎯
Focusing

Abdelhakim khabir hakkm

🎯
Focusing
View GitHub Profile
Don't worry about what anybody else is going to do. The best way to
predict the future is to invent it.
-- Alan Kay
Premature optimization is the root of all evil (or at least most of it)
in programming.
-- Donald Knuth
Lisp has jokingly been called "the most intelligent way to misuse a
computer". I think that description is a great compliment because it
@hakkm
hakkm / .ideavimrc
Created March 12, 2025 15:56
my ideavim's config
let mapleader = " "
""""""""""""""""""""""""""""""""""""""""" Plugins
Plug 'easymotion/vim-easymotion'
"""""""""""""""" mapping of easymotion
"map <leader>s <Plug>(easymotion-s)
Plug 'tpope/vim-commentary'
Plug 'machakann/vim-highlightedyank'
Plug 'tpope/vim-surround'
@hakkm
hakkm / Course.java
Last active March 12, 2025 23:14
OneToMany using a join table
package com.hello.demo.model;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import java.io.Serializable;
@Entity
@hakkm
hakkm / Laptop.java
Created March 13, 2025 01:07
One-to-Many bidirectional: no join table
package com.hello.demo.model;
import jakarta.persistence.*;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import tweepy
import openai
import matplotlib.pyplot as plt
import pandas as pd
import time
# -----------------------------
# Configuration (Replace with your API keys)
# -----------------------------
TWITTER_API_KEY = "YOUR_TWITTER_API_KEY"
import tweepy
import openai
import matplotlib.pyplot as plt
import pandas as pd
import time
# -----------------------------
# Configuration (Replace with your API keys)
# -----------------------------
TWITTER_API_KEY = "YOUR_TWITTER_API_KEY"
import streamlit as st
import requests
import pandas as pd
import matplotlib.pyplot as plt
from textblob import TextBlob
from datetime import datetime
from io import BytesIO
from fpdf import FPDF
# --- CONFIGURATION ---
@hakkm
hakkm / thinkpad p14s gen5 amd.md
Last active April 7, 2025 19:20
My Search Collection about Thinkpad P14s gen 5 (AMD), Linux focused

Problems/Fixes

1. power drain in sleep mode

Potential sleep issues that may require BIOS updates.

Solution 1

s2idle sucks, but you can make it suck less if you do the kernel param acpi.ec_no_wakeup=1 (on the P14s Gen 5 AMD, at least). This results in a normal-ish power drain in sleep mode and the laptop no longer gets hot. I haven't got a hard number to give you, but it doesn't self-drain in several hours. Comment link: https://www.reddit.com/r/thinkpad/comments/1ex38yg/which_thinkpad_is_best_for_linux_t14s_gen_4_vs/

Solution 2

https://bbs.archlinux.org/viewtopic.php?pid=2195411#p2195411