Skip to content

Instantly share code, notes, and snippets.

View chankruze's full-sized avatar

Chandan Kumar Mandal chankruze

View GitHub Profile
chankruze /
Created November 24, 2023 07:30 — forked from zawzaww/
Makefile Flags for Compiling TWRP
# by ZawZaw @XDA-Developers
# Thanks to : @xda-developers for helps
# Add EXT4 support
# Disable/enable SELinux. Only suggested when you want to enable SELinux support
from flask import Flask, jsonify, request
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def ReturnJSON():
if request.method == 'POST':
data = {"event": "Message Receive",

fix: /usr/bin/env: ‘bash\r’: No such file or directory

Check your path, echo $PATH. WSL2 normally imports Windows path there. To fix this create file /etc/wsl.conf in WSL2:

appendWindowsPath = false

Then restart WSL2 with wsl --shutdown. Then check your path is shorter now and doesn't include any Windows dependencies: echo $PATH

How to turn off Windows Defender in Windows 10/11 permanently

Step 1. Boot into safe mode

Click on Windows Start and search for msconfig. Run System Configuration as administrator.


You can also start the program Run. Type msconfig and click on OK.

Using JS, convert:

[ "OR", ["<", "a", "b"], [ "AND", ["==", "c", "d"], ["!=", "e", "f"] ] ]
// To:
a < b OR (c == d AND e != f)
Author: chankruze (
Created: Wed Mar 09 2022 10:06:36 GMT+0530 (India Standard Time)
Copyright (c) geekofia 2022 and beyond
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
const rgb2hex = (...args) => {
const hexColour = (c) => {
if (c < 256) return Math.abs(c).toString(16).padStart(2, "0");
return 0;
let hex = "#";
args.forEach(val => hex += hexColour(val))
return hex
chankruze /
Created June 25, 2021 19:33 — forked from xflr6/
Replacement for urllib.urlretrieve(url, filename) using the requests library
# - implement urllib.urlretrieve(url, filename) with requests
import contextlib
import urllib
import requests
def urlretrieve(url, filename):
with contextlib.closing(requests.get(url, stream=True)) as r:
git remote add heroku<project_name>.git
git keys:add