Skip to content

Instantly share code, notes, and snippets.

View mmdbalkhi's full-sized avatar
🏠
Working from home

komeil Parseh mmdbalkhi

🏠
Working from home
View GitHub Profile
@mmdbalkhi
mmdbalkhi / ninja.log
Created October 18, 2023 11:05
ninja
mmdbalkhi@parseh ~/w/Aegisub/build (git)-[feature] % ninja
[2/499] Compiling C++ object subprojects/ffms2/libffms2.a.p/src_core_filehandle.cpp.o
In file included from ../subprojects/ffms2/src/core/filehandle.cpp:23:
../subprojects/ffms2/src/core/utils.h:102:10: warning: unnecessary parentheses in declaration of 'ptr' [-Wparentheses]
102 | T(FFMS_Struct::*ptr);
| ^~~~~~~~~~~~~~~~~~~
../subprojects/ffms2/src/core/utils.h:102:10: note: remove parentheses
102 | T(FFMS_Struct::*ptr);
| ^~~~~~~~~~~~~~~~~~~
| - -
@mmdbalkhi
mmdbalkhi / meson.log
Created October 18, 2023 08:58
meson.log
The Meson build system
Version: 1.2.0
Source dir: /home/mmdbalkhi/w/Aegisub
Build dir: /home/mmdbalkhi/w/Aegisub/build
Build type: native build
Project name: Aegisub
Project version: 3.2.2
C compiler for the host machine: cc (gcc 12.2.0 "cc (GCC) 12.2.0")
C linker for the host machine: cc ld.bfd 2.39
C++ compiler for the host machine: c++ (gcc 12.2.0 "c++ (GCC) 12.2.0")
@mmdbalkhi
mmdbalkhi / error.log
Created October 18, 2023 08:32
ninja-error
mmdbalkhi@parseh ~/w/Aegisub/build (git)-[remotes/origin/feature~1] % ninja
[5/472] Compiling C++ object subprojects/ffms2/libffms2.so.p/src_core_audiosource.cpp.o
FAILED: subprojects/ffms2/libffms2.so.p/src_core_audiosource.cpp.o
c++ -Isubprojects/ffms2/libffms2.so.p -Isubprojects/ffms2 -I../subprojects/ffms2 -I../subprojects/ffms2/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++14 -O3 -fPIC -D_FILE_OFFSET_BITNS=64 -DFFMS_EXPORTS -D__STDC_CONSTANT_MACROS -MD -MQ subprojects/ffms2/libffms2.so.p/src_core_audiosource.cpp.o -MF subprojects/ffms2/libffms2.so.p/src_core_audiosource.cpp.o.d -o subprojects/ffms2/libffms2.so.p/src_core_audiosource.cpp.o -c ../subprojects/ffms2/src/core/audiosource.cpp
In file included from ../subprojects/ffms2/src/core/audiosource.h:24,
from ../subprojects/ffms2/src/core/audiosource.cpp:21:
../subprojects/ffms2/src/core/utils.h:102:10: warning: unnecessary parentheses in declaratio
@mmdbalkhi
mmdbalkhi / pashare.sh
Created May 9, 2022 17:37
stream sounds with pulseaudio
#!/bin/sh
ip=`ip addr show | grep -oP '(?<=inet\s)(192\.)+\d+(\.\d+){2}'`
rate=48000
channels=2
port=1234
case "$1" in
start)
echo "* ip: $ip"
@mmdbalkhi
mmdbalkhi / README.md
Created March 10, 2022 15:18
script Take a screenshot by ImageMagick

script Take a screenshot by ImageMagick

This script requires version 3.9 of Python or higher and you must also have imagemagick installed.

useage

  • To take a screenshot in the Pictures folder in the user's home:
python screenshot.py
@mmdbalkhi
mmdbalkhi / chert_nevic.py
Created September 20, 2021 11:12
Convert incorrectly written words (wrong keyboard layout) into readable words
#! /bin/python3
"""Convert Chert words to human redebel texts"""
en = "qwertyuiop[]asdfghjkl;'zxcvbnm,./1234567890-=\ "
fa = "ضصثقفغعهخحجچشسیبلاتنمکگظطزرذدپو./۱۲۳۴۵۶۷۸۹۰-=\ "
def fa_chertnevic(chert):
"""Convert Chert words to human redebel texts
fa_chertnevic('sghl') == 'سلام'"""
{% extends 'base.html' %}
{% block content %}
<h1>{% block title %} MozLink! {% endblock %}</h1>
<form method="post">
<div class="form-group">
<label for="url">URL</label>
<input type="text" name="url" placeholder="URL to shorten" class="form-control"
value="{{ request.form['url'] }}" autofocus></input>
</div>
<div align="center" class="form-group">
@mmdbalkhi
mmdbalkhi / base_virgool.html
Created April 25, 2021 08:22
base_virgool.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<title>{% block title %} {% endblock %}</title>
<style>.center {
margin: auto;
@mmdbalkhi
mmdbalkhi / index_site_virgool.py
Created April 25, 2021 08:21
index_site_virgool.py
@app.route('/', methods=('GET', 'POST'))
def index():
conn = sqlite3.connect('database.db')
conn.row_factory = sqlite3.Row
if request.method == 'POST':
url = request.form['url']
if not url:
flash('The URL is required!')
return redirect(url_for('index'))
url_data = conn.execute('INSERT INTO urls (original_url) VALUES (?)',