Skip to content

Instantly share code, notes, and snippets.

View ehzawad's full-sized avatar
🎃
Wasteland Baby!

ehzawad ehzawad

🎃
Wasteland Baby!
View GitHub Profile
@ehzawad
ehzawad / nerd_fonts.md
Created July 28, 2023 19:10 — forked from davidteren/nerd_fonts.md
Install Nerd Fonts via Homebrew [updated & fixed]
@ehzawad
ehzawad / lua-stuff.lua
Created July 28, 2023 19:02
Switching to luascript from VimScript
--[[
=====================================================================
==================== READ THIS BEFORE CONTINUING ====================
=====================================================================
Kickstart.nvim is *not* a distribution.
Kickstart.nvim is a template for your own configuration.
The goal is that you can read every line of code, top-to-bottom, understand
@ehzawad
ehzawad / mind-around.js
Created July 28, 2023 13:32
yay, call stack!
setTimeout(() => console.log(1));
Promise.resolve().then(() => console.log(2));
Promise.resolve().then(() => setTimeout(() => console.log(3)));
new Promise(() => console.log(4));
setTimeout(() => console.log(5));
const fs = require('fs');
console.log(1);
console.log(2);
setTimeout(() => {
console.log('setTimeout');
}, 0);
console.log(3);
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
}
canvas {
import time
import threading
class Runner:
def __init__(self, name, sleep_time, steps):
self.name = name
self.sleep_time = sleep_time
self.steps = steps
def run(self):
@ehzawad
ehzawad / core_concept.md
Created July 16, 2023 11:53
Django Core COncept
  • models and databases
  • handling http requests
  • working with forms
  • templates
  • class-based views
  • migrations
  • managing files
  • testing in Django
  • user authentication in Django
  • Django's cache framework
def bisearch(listt, targett):
fi = 0
hi = len(my_list) - 1
while fi <= hi:
mid = (fi + hi ) // 2
if target > my_list[mid]:
fi = mid + 1
elif target < my_list[mid]:
absl-py==0.13.0
aio-pika==6.8.2
aiofiles==23.1.0
aiohttp==3.7.4
aiormq==3.3.1
APScheduler==3.7.0
astunparse==1.6.3
async-generator==1.10
async-timeout==3.0.1
attrs==21.2.0
@ehzawad
ehzawad / clent-side.js
Created June 22, 2023 19:21
A simple VPN in server side and in client side in the localhost environment!!
var net = require('net');
var crypto = require('crypto');
var pw = 'abc123';
console.log('[Client] Connecting to server...');
var stream = net.connect(5005,'localhost');
stream.on('connect', function() {
console.log('[Client] Connected to server, starting data transfer...');
});