Skip to content

Instantly share code, notes, and snippets.

View mrf345's full-sized avatar

Mohamed Feddad mrf345

  • UAE
View GitHub Profile
@mrf345
mrf345 / send_sms.py
Created July 26, 2018 08:12 — forked from m0rff/send_sms.py
Sending a SMS with Python and pyserial via an USB 3G Modem on pfSense/FreeBSD
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Sending a SMS with Python and pyserial via an USB 3G Modem on pfSense/FreeBSD
# tested with: Huawei Technologies Co., Ltd. E620 USB Modem
# and a Telekom SIM card
import serial
from curses import ascii
import time
@mrf345
mrf345 / build_flask_.sh
Created October 7, 2017 13:20
Building one-file executable for Python Flask using Pyinstaller
#!/bin/bash
pyinstaller -F -w \
--hidden-import='email.mime.multipart' \
--hidden-import='email.mime.message' \
--hidden-import='email.mime.text' \
--hidden-import='email.mime.image' \
--hidden-import='email.mime.audio' \
--hidden-import='sqlalchemy.sql.default_comparator' \
--hidden-import='jinja2' \
main.py
spaces_length = ((the expected length to make them all equal - the length of the task name) / 2)

and then replace the task name with:

(' ' * space_length[0]) + task_name + (' ' * spaces_length[1])
@mrf345
mrf345 / translation_example.json
Created February 10, 2020 13:46
Example of adding Bulgarian to FQM translations
" Opps, a critical error has occurred, we will be ": {
"ar": "\u062d\u062f\u062b \u062e\u0637\u0623 \u0641\u0627\u062f\u062d \u0641\u064a \u062a\u0634\u063a\u064a\u0644 \u0627\u0644\u0646\u0638\u0627\u0645 , \u0633\u0646\u0643\u0648\u0646 \u0634\u0627\u0643\u0631\u064a\u0646 \u0644\u0643 \u0625\u0646 ",
"en": " Opps, a critical error has occurred, we will be ",
"es": " un error cr\u00edtico ha ocurrido. ",
"fr": " une erreur critique est survenue. veuillez ",
"it": " si \u00e8 verificato un errore critico. ",
"bg": "Опс, възникна критична грешка, ще бъдем"
}
{
"window.zoomLevel": 1,
"editor.fontSize": 17,
"window.menuBarVisibility": "hidden",
"workbench.colorTheme": "Dracula",
"workbench.iconTheme": "easy-icons",
"python.jediEnabled": false,
"workbench.sideBar.location": "right",
"terminal.integrated.rendererType": "dom",
"editor.minimap.enabled": false,
set_ps () {
PS1='\[\033[0;32m\]\[\033[0m\033[0;32m\]\u\[\033[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\] ($(git branch 2>/dev/null | grep '^*' | colrm 1 2))\n\[\033[0;32m\]└─\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\] ▶\[\033[0m\] ';
}
@mrf345
mrf345 / compton.conf
Last active December 10, 2019 09:55
compton config on archlinux nvidia drivers
#################################
#
# Backend
#
#################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";
{
"workbench.sideBar.location": "right",
"macros": {
"toggleBars": [
"workbench.action.toggleActivityBarVisibility",
"workbench.action.toggleSidebarVisibility",
],
"focusExplorer": [
"macros.toggleBars",
"workbench.files.action.focusFilesExplorer"
dbaeumer.vscode-eslint-1.8.2 geddski.macros-1.2.1 ms-python.python-2019.2.5558
file-icons.file-icons-1.0.16 jmfirth.vsc-space-block-jumper-1.2.2 rubymaniac.vscode-paste-and-indent-0.0.8
formulahendry.auto-close-tag-0.5.6 lfs.vscode-awesome-emacs-keymap-0.8.2 streetsidesoftware.code-spell-checker-1.6.10
formulahendry.vscode-mysql-0.3.0 monokai.theme-monokai-pro-vscode-1.1.12 wayou.vscode-todo-highlight-1.0.4
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+alt+space",
"command": "macros.toggleBars"
},
{
"key": "ctrl+x ctrl+c",
"command": "workbench.action.keepEditor"
},