Skip to content

Instantly share code, notes, and snippets.

Always Learning...

Mohammad Javad Naderi mjnaderi

Always Learning...
Block or report user

Report or block mjnaderi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mjnaderi /
Last active Sep 17, 2019
Anki Card Template
  • Install "Syntax Highlighting for Code" plugin:

  • In the plugin's options (Tools > Syntax Highlighting Options), set:

    • Line numbers
    • Center code fragments
    • Use CSS classes
  • Enter following HTML and CSS templates in Tools > Manage Note Types > Cards

$ pacman -S xprintidle xdotool iw
$ while true; do idle=`xprintidle`; print `date` ' | ' 'Idle:' "$((idle/1000))s" ' | ' `xdotool getactivewindow getwindowname`; sleep 10; done
$ iw dev wlp2s0 info
mjnaderi / iran_cities.json
Created Dec 4, 2018
Iran Provinces and Cities (from on 2018 Dec 4)
View iran_cities.json
"id": 1,
"province": "آذربایجان شرقی",
"cities": [
"name": "آبش احمد",
"phonetic": "Ābešahmad",
"longitude": "47.3171388",
"latitude": "39.04429447"
# To enable, set environment variable "PYTHONSTARTUP" to the path of this file
import sys
import datetime
class ClockPS1(object):
def __repr__(self):
now =
return '\033[92m{}\033[0m \033[95m\033[1m>>>\033[0m '.format(str(now.strftime("%H:%M:%S.%f"))[:-4])
mjnaderi /
Created May 29, 2018
Logging to Syslog in Django
mjnaderi / qownbidi.qml
Created May 12, 2018
A script for QOwnNotes to add RTL support
View qownbidi.qml
import QtQml 2.0
QtObject {
* This function is called when the markdown html of a note is generated
* It allows you to modify this html
* @param {Note} note - the note object
* @param {string} html - the html that is about to being rendered
mjnaderi /
Last active Dec 16, 2019 — forked from mattiaslundberg/arch-linux-install
Install Arch Linux with Full Disk Encryption (LVM on LUKS)
mjnaderi / queval.js
Created Sep 26, 2015
Simple math expression evaluator based on jsep
View queval.js
var jsep = require('jsep');
(function (root) {
var COMPOUND = 'Compound',
IDENTIFIER = 'Identifier',
MEMBER_EXP = 'MemberExpression',
LITERAL = 'Literal',
THIS_EXP = 'ThisExpression',
CALL_EXP = 'CallExpression',
You can’t perform that action at this time.