Skip to content

Instantly share code, notes, and snippets.

View 0x61nas's full-sized avatar
🐈
doing cat stuff

0x61nas

🐈
doing cat stuff
View GitHub Profile
{
description = "NextJS Template";
inputs = {
nixpkgs.url = "nixpkgs";
systems.url = "github:nix-systems/x86_64-linux";
utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
{ lib, pkgs, ... }:
{
home.packages = with pkgs; [ delta ];
programs.git = {
enable = true;
userName = "0x61nas";
userEmail = "anas.elgarhy.dev@gmail.com";
ignores = [ "*~" ];
signing = {
#signByDefault = true;
{ lib, pkgs, config, ... }:
{
services.gpg-agent = {
enable = true;
enableSshSupport = true;
# Cache the PIN for 3 hours
defaultCacheTtl = 3600*3;
#grabKeyboardAndMouse = false;
#pinentryPackage = pkgs.pinentry;
};
{lib, pkgs, ... }:
{
# Download the prompt
home.file.".config/zsh/prompt.zsh".source = builtins.fetchurl {
url = "https://gist.githubusercontent.com/0x61nas/6ee08add16a0ac8f63bfc485be5239f0/raw/100a7fecc752b6fe0ce564124a3c1e660ce18b7a/prompt.zsh";
sha256 = "0cl2ml4z62yiwn0n5wk6bj4zsf5avjl643c66k2p0m2bfa8a2pwk";
};
programs.zsh = {
enable = true;
function shrink_path {
# Replace the home directory with ~ for brevity
local path="${PWD/#$HOME/~}"
local new_path=""
local -a path_components=("${(@s:/:)path}")
local num_components=${#path_components[@]}
# Loop through each component except the last one
for (( i=1; i < num_components; i++ )); do
if [[ -n ${path_components[i]} ]]; then
new_path+="%{$fg[yellow]%}${path_components[i][1]}%{$reset_color%}%{$fg[white]%}:%{$reset_color%}"
@0x61nas
0x61nas / CompleteDiscordQuest.md
Created April 26, 2024 14:34 — forked from aamiaa/CompleteDiscordQuest.md
Complete Recent Discord Quest

Complete Recent Discord Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
lib,
config,
pkgs,
...
}: {
# You can import other NixOS modules here

Ordinary user-space programs that written in NASM for Linux are divided into three sections: .data, .bss, and .text. The older in which these sections fall in your program really doesn't matter, but by convention the .data section comes first, followed by .bss section and then the .text section.

.data

The .data section contains data deffinitions of initialized data items.

Initialized data is data that has a value before the program begins running. These values are part of the executable file. They are loaded into memory when the executable file is loaded into memrory for execution.

Note

That you don't load the data defined in .data section manually, and no machine cycles are used in there certion beyond what it takes to load the program as a whole into memory.

Implicit Operands

Some instructions act on registers or even memory locations that are not stated in a list of operands. These instruction does do in fact have operands, but they represent assumptions made by the instruction. Implicit operands dose not change and cannot be changed. Most of the instruction that have implicit opeands dose have explicit operands as well.

MUL

The MUL instruction multiplies two values and returns the product. However, multiplication has a special problem: It generates output values that are often hugely lager than the input values. think of 0xffffffff * 0xffffffff. So to solve this problem the MUL instructison uses an implicit operands to store the product: by using two registers to hold our product.

[!Note]