Skip to content

Instantly share code, notes, and snippets.

View mostafaasadi's full-sized avatar
💻
developing ...

Mostafa Asadi mostafaasadi

💻
developing ...
View GitHub Profile
@PaulCreusy
PaulCreusy / SelfSignWindowsExecutable.md
Last active May 20, 2024 03:05
How to self-sign a Windows executable created with Pyinstaller

How to self-sign a Windows package created with Pyinstaller

This document aims to explain all the necessary steps to self-sign a Windows executable.

⚠️ Warning
Some of the commands provided need to be completed. The fields to complete are indicated by the characters < and >.

Prerequisites

Please make sure to match all the prerequisite before starting the process of signing the package.

@morealaz
morealaz / linux-font-config.md
Last active May 17, 2024 12:59
تنظیمات فونت لینوکس

تنظیمات فونت لینوکس

مقدمه

تنظیمات فونت در لینوکس بر عهده برنامه fontconfig میباشد. این برنامه فونتهای سیستم را بر اساس الویت بندیهایی که قابل تنظیم میباشد مرتب میکند و در اختیار سایر برنامه ها قرار می دهد. مشکل اصلی که اکثر کاربران فارسی زبان لینوکس در ارتباط با fontconfig دارند عدم نمایش صحیح حروف فارسی می باشد که معمولا به دو دلیل زیر اتفاق می‌افتد:

  • نصب نبودن فونت مناسب بر روی سیستم که حروف فارسی را ساپورت کند
  • عدم وجود فایل تنظیمات fontconfig برای انتخاب فونت مناسب برای نمایش حروف فارسی
@aleixmorgadas
aleixmorgadas / keychron K3.md
Last active January 6, 2023 12:36
Keychron K3 Linux
@andrebrait
andrebrait / keychron_linux.md
Last active May 23, 2024 23:49
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@amrza
amrza / run.py
Last active May 14, 2024 18:55
How to write RTL(Arabic/Persian) text on images in python.
# Tested on Python 3.6.1
# install: pip install --upgrade arabic-reshaper
import arabic_reshaper
# install: pip install python-bidi
from bidi.algorithm import get_display
# install: pip install Pillow
from PIL import ImageFont
@joncardasis
joncardasis / WebServer.py
Created February 7, 2017 21:08
A simple and quick HTTP web server in Python
"""
Author: Jonathan Cardasis
"""
import socket
import signal # Allow socket destruction on Ctrl+C
import sys
import time
import threading
@octalmage
octalmage / roles.md
Last active May 14, 2023 17:43
Default WordPress user roles and capabilities.

WordPress v4.3.1

Admin wp_capabilities wp_user_level 10

a:1:{s:13:"administrator";b:1;}

Contributor wp_capabilities wp_user_level 1

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 24, 2024 06:43
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@jakemmarsh
jakemmarsh / binarySearchTree.py
Last active September 26, 2022 18:06
a simple implementation of a Binary Search Tree in Python
class Node:
def __init__(self, val):
self.val = val
self.leftChild = None
self.rightChild = None
def get(self):
return self.val
def set(self, val):
@gdamjan
gdamjan / count-github-commits.py
Created September 25, 2011 20:18
A python script to count commits in all of your own repositories on github (not cheking branches)
#! /usr/bin/env python2
import json
import requests
def count_user_commits(user):
r = requests.get('https://api.github.com/users/%s/repos' % user)
repos = json.loads(r.content)
for repo in repos: