Skip to content

Instantly share code, notes, and snippets.

View Rizwan-Hasan's full-sized avatar
🌏
Working remotely

Rizwan Hasan Rizwan-Hasan

🌏
Working remotely
View GitHub Profile
@ThoNohT
ThoNohT / dehaskell.md
Last active April 24, 2024 23:30
Cleaning haskell packages from pacman

Cleaning up haskell packages on Arch Linux

In Arch Linux, all haskell packages are dynamically linked. This can be a headache for the user, since it results in a large amount of haskell-* packages being installed on your system, and the possibility for version conflicts. A way around this is to not depend on pacman at all for haskell packages, but manually install them. In this document I explain how I switched from a lot of haskell packages installed with pacman, to a few manually installed packages.

Finding packages to uninstall

To determine which packages to uninstall (and replace), a few tools are useful:

  • pacman itself
  • pacgraph
@bodrulamin
bodrulamin / 90-bn.conf
Last active March 22, 2023 20:46
Manjaro xfce bengali font Problem solve. copy this file to (if directory not exist create one) ~/.config/fontconfig/conf.d/90-bn.conf
<fontconfig>
<match target="pattern">
<test name="lang" compare="contains">
<string>bn</string>
</test>
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans Bengali</string>
# ~/.config/systemd/user/jupyter.service
[Unit]
Description=An interactive python notebook server
After=network.target

[Service]
ExecStart=/usr/bin/jupyter notebook\
    --no-browser\
 --port=8001\
# Put this file in /etc/nginx/sites-available
# Then "ln -s /etc/nginx/sites-available/aria2-nginx.conf /etc/nginx/sites-enabled"
# Then "sudo service nginx restart"
server {
listen 80;
listen [::]:80;
root /var/www/aria2; # Put your aria2 web ui here, such as AriaNg
index index.html;
server_name DOMAIN_NAME;
location / {
import requests
def main():
userName: str = 'magpie-robins' # User name of the repository
repoName: str = 'gpa-calculator-android' # Repository name
releaseTag: str = 'latest' # Using tag 'latest' for latest released download count
url: str = "https://api.github.com/repos/{0}/{1}/releases/{2}" # API URL
response = requests.get(url.format(userName, repoName, releaseTag)) # Sending HTTP GET request on API URL
data: dict = response.json() # Converting received data to JSON format
# The JSON file contains huge data about that release.
@Nottt
Nottt / compile-opus.sh
Last active September 20, 2022 18:33
Compile Opus-Tools in Ubuntu 18.04
#!/bin/bash
# Install opus-tools
# Latest releases: opus 1.3.1, opus-tools 0.2, opusfile 0.11, libopusenc 0.2.1
set -e
set -o pipefail
# Install packages needed
apt update > /dev/null 2>&1 && apt install -y curl libflac-dev > /dev/null 2>&1
@Rizwan-Hasan
Rizwan-Hasan / README.md
Created June 6, 2019 16:16 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

msys2 vs msys vs msysgit
MinGW doesn't provide a linux-like environment, that is MSYS(2) and/or Cygwin
Cygwin is an attempt to create a complete UNIX/POSIX environment on Windows.
MinGW is a C/C++ compiler suite which allows you to create Windows executables - you only
need the normal MSVC runtimes, which are part of any normal Microsoft Windows installation.
MinGW provides headers and libraries so that GCC (a compiler suite,
not just a "unix/linux compiler") can be built and used against the Windows C runtime.
@dalejfer
dalejfer / pyside2_qrunnable_signal_test.py
Created March 11, 2019 03:12
Run a QTheadPool with signal emitting QRunnable workers. Capture the signals in the main thread and update the UI.
#!python3.7
import random
import time
import PySide2
from PySide2 import QtCore, QtWidgets
from PySide2.QtCore import Slot, Signal, QObject, QThreadPool, QRunnable
class MyEmitter(QObject):
@Julian-Nash
Julian-Nash / upload.html
Created February 22, 2019 19:56
File upload with progress bar, cancel and percent complete - XMLHTTPRequest (Bootstrap 4)
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">