Skip to content

Instantly share code, notes, and snippets.

View sugayaa's full-sized avatar

sugaya sugayaa

View GitHub Profile
/* Deleting a node from Binary search tree */
#include<iostream>
using namespace std;
struct Node {
int data;
struct Node *left;
struct Node *right;
};
//Function to find minimum in a tree.
Node* FindMin(Node* root)
@laptrinhcomvn
laptrinhcomvn / Sublime Text 3 cheating.md
Last active November 17, 2023 06:53
Sublime Text 3 patching

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
@lubien
lubien / stickers-downloader.js
Last active November 21, 2023 03:06
Download all visible telegram stickers images
// How to download telegram sticker images
/*
1. Go to Telegram Web;
2. Open console (F12);
3. Paste the code below in the console and press Enter;
4. Open your stickers menu and make sure you see the sticker pack you want to download (so Telegram will load it).
5. At the console paste and run "downloadStickers()" any time you want to download a pack.
6. [Convert .webm to another format](http://www.freewaregenius.com/convert-webp-image-format-jpg-png-format/);
7. Happy hacking.
@PedroHLC
PedroHLC / hostapd-wpe.PKGBUILD
Last active October 30, 2019 16:18
hostapd-wpe 2.8
_pkgname=hostapd
pkgname="${_pkgname}-wpe"
pkgver=2.8
pkgrel=0
pkgdesc="IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator (with hostapd-wpe patch)"
arch=('x86_64' 'aarch64')
url="https://w1.fi/hostapd/"
license=(GPL)
depends=('openssl' 'libnl')
options=(emptydirs)
@hva314
hva314 / eb_msf
Created October 14, 2017 05:01
EternalBlue-DoublePulsar Metasploit Module
## setting up wine32
dpkg --add-architecture i386
apt-get update
apt-get install wine32
mkdir -p /root/.wine/drive_c/
## get doublepulsar module for metasploit
mkdir -p /root/.msf4/modules/exploits/windows/smb/
git clone https://github.com/ElevenPaths/Eternalblue-Doublepulsar-Metasploit.git /root/.msf4/modules/exploits/windows/smb/
@extremecoders-re
extremecoders-re / qemu-networking.md
Last active May 4, 2024 05:55
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

#
#
# Created by Olivato :D
#
#
import pygame, sys
from pygame.locals import *
// By Pedro H. Lara Campos (RA 726578)
// Trabalho de PAA
// 2018-09-18
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#define dprintf(...) //fprintf(stderr, __VA_ARGS__)
/*
Trabalho PAA - Crush
Menor caminho com Dijkstra
Autor: Pedro Henrique Lara Campos (UFSCar RA 726578)
Data: 2018-11-21
https://run.codes/exercises/view/9772
*/
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
@olivatooo
olivatooo / polybar.sh
Last active August 3, 2020 05:04
Bash script to randomly select an wallpaper and use wal to set the system colorscheme. Useful for i3+wal!
#!/bin/bash
## Author : Aditya Shakya
## Github : adi1090x
## Edited by me
PDIR="$HOME/.config/polybar"
LAUNCH="polybar-msg cmd restart"
# Replacing colors