Skip to content

Instantly share code, notes, and snippets.

View luk0y's full-sized avatar
🎯
Focusing

luk0y luk0y

🎯
Focusing
View GitHub Profile
@luk0y
luk0y / extenstion.js
Last active September 12, 2024 07:07
Remove "Take Screenshot" on Ubuntu from window context Menu
// Tested on Ubuntu 24.04. Updated based on the code shared here https://www.reddit.com/r/gnome/comments/vj2s53/comment/idi59rf/
// Follow this guide to create extention https://gjs.guide/extensions/development/creating.html. Add this code in extension.js and don't forget to enable the extension.
// Fan of ALT + Space for minimising windows
import { WindowMenu } from 'resource:///org/gnome/shell/ui/windowMenu.js';
export default class MyTestExtension {
constructor() {
this._originalBuildMenu = null;
}
@luk0y
luk0y / file converter.txt
Created December 9, 2023 10:51
failed to read PNG signature: file does not start with PNG signature. - apktool
Have you ever gone through this error while building apk using apktool?
W: /home/nnnn/Desktop/Android/com.package/res/drawable-hdpi/arrow_t_l.png: error: failed to read PNG signature: file does not start with PNG signature.
W: /home/nnnn/Desktop/Android/com.package/res/drawable-hdpi/arrow_t_l.png: error: file failed to compile.
W: /home/nnnn/Desktop/Android/com.package/res/drawable-hdpi/arrow_t_r.png: error: failed to read PNG signature: file does not start with PNG signature.
W: /home/nnnn/Desktop/Android/com.package/res/drawable-hdpi/arrow_t_r.png: error: file failed to compile.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1):
Here's the solution:
@luk0y
luk0y / a.txt
Created September 10, 2021 20:05
aiohttp==3.7.4.post0
async-timeout==3.0.1
asyncio==3.4.3
attrs==21.2.0
backports.zoneinfo==0.2.1
certifi==2021.5.30
chardet==4.0.0
charset-normalizer==2.0.4
dateparser==1.0.0
idna==3.2
@luk0y
luk0y / aes-ecb-128.py
Created May 29, 2021 05:16
AES ECB 128 bit encryption in python3. 100% working
from Crypto import Random
from Crypto.Cipher import AES
import base64
from pkcs7 import PKCS7Encoder
# References
# AES 128 Bit ECB mode https://www.devglan.com/online-tools/aes-encryption-decryption
# https://stackoverflow.com/a/64545969
Andhra Pradesh
Arunachal Pradesh
Assam
Bihar
Chhattisgarh
Goa
Gujarat
Haryana
Himachal Pradesh
Jammu and Kashmir
@luk0y
luk0y / gen-rsa-pubkey.sh
Created November 10, 2020 06:23 — forked from icetan/gen-rsa-pubkey.sh
Create a public RSA key from modulus and exponent on the command line
#!/bin/bash
set -e
b2hex() { echo -n $1|base64 --decode | xxd -p -u | tr -d \\n; }
modulus=$(b2hex u2/nlDLMbqLY+XBnWlqHv74a/wvmPoefKv+5NkTU0sbQAEMN7Gar9Hgp50uMUQhiOhwO6L4hezrY021etPyh2Q==)
exponent=$(b2hex AQAB)
asn1conf=$(echo -e "asn1=SEQUENCE:pubkeyinfo\n[pubkeyinfo]\nalgorithm=SEQUENCE:rsa_alg\npubkey=BITWRAP,SEQUENCE:rsapubkey\n[rsa_alg]\nalgorithm=OID:rsaEncryption\nparameter=NULL\n[rsapubkey]\nn=INTEGER:0x$modulus\ne=INTEGER:0x$exponent" | openssl asn1parse -genconf /dev/stdin -noout -out /dev/stdout | base64)
@luk0y
luk0y / example_image_utils.py
Created September 30, 2020 13:47 — forked from josephkern/example_image_utils.py
Layer on top of Python Imaging Library (PIL) to write text in images easily
#!/usr/bin/env python
# coding: utf-8
# You need PIL <http://www.pythonware.com/products/pil/> to run this script
# Download unifont.ttf from <http://unifoundry.com/unifont.html> (or use
# any TTF you have)
# Copyright 2011 Álvaro Justen [alvarojusten at gmail dot com]
# License: GPL <http://www.gnu.org/copyleft/gpl.html>
from image_utils import ImageText
@luk0y
luk0y / Stack_Linkedlist.c
Created March 9, 2019 16:26
Creation of stack using Linked list
#include <stdio.h>
#include <stdlib.h>
struct node{
char k;
struct node *addr;
};
struct node *start,*ptr,*nn,*top;
int main(){
struct node *ms;
int y;
@luk0y
luk0y / linkedlist_sort.c
Created March 9, 2019 16:23
Sorting a linked list using bubble sort algorithm
#include<stdio.h>
#include<stdlib.h>
struct node
{
struct node *addr;
int data;
};
void main()
{
struct node *start=NULL,*nn,*ptr,*next;
@luk0y
luk0y / double_linkedlist.c
Created March 9, 2019 16:20
Creation of a double linked list
//By luk0y
#include <stdio.h>
#include <stdlib.h>
struct node {
int data;
struct node *prev;
struct node *post;
};
void main()
{