Skip to content

Instantly share code, notes, and snippets.

View TheLime1's full-sized avatar
๐Ÿ“
Exams

Aymen Hmani TheLime1

๐Ÿ“
Exams
View GitHub Profile
// ==UserScript==
// @name ccna
// @namespace http://tampermonkey.net/
// @version 1.69
// @description Show quiz answer in div
// @author TheLime1
// @match https://www.netacad.com/*
// @grant none
// ==/UserScript==
@TheLime1
TheLime1 / Esprit_avg.js
Created December 2, 2024 08:47
paste this code in the browser console to calculate your total grade
function tableToJson(table) {
var data = [];
// first row needs to be headers
var headers = [];
for (var i = 0; i < table.rows[0].cells.length; i++) {
headers[i] = table.rows[0].cells[i].innerHTML
.toLowerCase()
.replace(/ /gi, "");
}
@TheLime1
TheLime1 / branches_in_folders.sh
Last active November 18, 2024 13:33
Download a repo and all its branches
# Clone the repository
git clone https://github.com/user/repo
# Change directory to the cloned repository
cd repo
# Fetch all branches
git fetch --all
# Create a directory to store branches
composer create-project symfony/skeleton:6.4.* Template
composer require webapp
symfony server:start
symfony serve
@TheLime1
TheLime1 / git_history_delete.sh
Last active November 18, 2024 13:21
how to delete git hustory of a repo
git checkout --orphan temp_branch
git add -A
git commit -am "Initial commit"
git branch -D main
git branch -m main
git push -f origin main
[h1] THE G.O.A.T :[/h1]
[b] Counter Strike [/b]
[hr][/hr]
- Assassin's Creed Syndicate
- BATTLE BIT Remasted
- Batman Arkahm city
- Battelfield 1
- BROFORCE
- Civ 6
- Cities Skylines
@TheLime1
TheLime1 / mail_filter.xml
Created January 10, 2024 12:29
ESPRIT mail filter
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>
<title>Mail Filters</title>
<id>tag:mail.google.com,2008:filters:z0000001667905335198*6215492785434248751,z0000001667905735921*2748909128081098549,z0000001674907921291*0017114937320279571,z0000001674908218441*4912550608679637887,z0000001674908279939*7306633436959057927,z0000001674908786438*0746870088591592458,z0000001676200410470*8172403070932078157,z0000001676812138978*7518071403128387212,z0000001676812212618*3359559599612787674,z0000001692705541876*1878449051116841583,z0000001694529249747*4928326717695549519,z0000001694529289072*3400667990221411116,z0000001700564038846*8823670471876653312</id>
<updated>2024-01-10T12:01:52Z</updated>
<author>
<name>Hmani Aymen</name>
<email>[email protected]</email>
</author>
<entry>
@TheLime1
TheLime1 / infinite_web.py
Created June 21, 2023 00:53
Build an infinite website with Flask and OpenAI's GPT-3.5. This code combines Flask's routing and OpenAI's text generation to dynamically generate web pages based on URL paths and request data
from flask import Flask, request
import os
import openai
import json
# flask --app main --debug run
openai.api_key = "YOUR_OPENAI_API_KEY"
app = Flask(__name__)