Skip to content

Instantly share code, notes, and snippets.

View mjnaderi's full-sized avatar
📖
Always Learning...

Mohammad Javad Naderi mjnaderi

📖
Always Learning...
View GitHub Profile
@mjnaderi
mjnaderi / .gtkrc-2.0
Created July 18, 2014 15:46
~/.gtkrc-2.0 Fix eclipse (Also use https://github.com/mjnaderi/eclipse-themes)
style "gtkcompact" {
# font_name="Liberation 8"
GtkButton::defaultborder={0,0,0,0}
GtkButton::defaultoutsideborder={0,0,0,0}
GtkButtonBox::childminwidth=0
GtkButtonBox::childminheigth=0
GtkButtonBox::childinternalpadx=0
GtkButtonBox::childinternalpady=0
GtkMenu::vertical-padding=0
GtkMenuBar::internalpadding=0
@mjnaderi
mjnaderi / icedream-eclipse-theme.xml
Last active August 29, 2015 14:04
My Eclipse Color Theme (based on Schuss) to be used with Eclipse Color Theme Plugin
<?xml version="1.0" encoding="utf-8"?>
<colorTheme id="28852" name="IceDream" modified="2014-07-23 15:43:53" author="Mohammad Javad Naderi">
<searchResultIndication color="#DDDDDD" />
<filteredSearchResultIndication color="#DDDDDD" />
<occurrenceIndication color="#DDDDDD" />
<writeOccurrenceIndication color="#DDDDDD" />
<findScope color="#BCADAD" />
<deletionIndication color="#9b5656" bold="false" />
<sourceHoverBackground color="#EEEEEE" />
<singleLineComment color="#BBBBBB" italic="true" />
@mjnaderi
mjnaderi / upvpn.sh
Last active March 25, 2023 14:21
UpVPN (reconnect vpn when disconnected)
#!/bin/bash
# Usage:
# ./upvpn.sh "VPN Connection Name"
VPN="$1"
trap "exit 0" SIGINT SIGTERM
while true; do
@mjnaderi
mjnaderi / queval.js
Created September 26, 2015 14:10
Simple math expression evaluator based on jsep
var jsep = require('jsep');
(function (root) {
var COMPOUND = 'Compound',
IDENTIFIER = 'Identifier',
MEMBER_EXP = 'MemberExpression',
LITERAL = 'Literal',
THIS_EXP = 'ThisExpression',
CALL_EXP = 'CallExpression',
@mjnaderi
mjnaderi / install-arch.md
Last active April 13, 2024 11:33 — forked from mattiaslundberg/arch-linux-install
Installing Arch Linux with Full Disk Encryption (LVM on LUKS)

Installing Arch Linux with Full Disk Encryption

If you're aiming for a seamless Arch Linux installation in UEFI mode, follow along as this guide will walk you through the process step by step. We'll be using LUKS (Linux Unified Key Setup) and LVM (Logical Volume Manager) partitions on LUKS to achieve full disk encryption.

Note: I have updated this doc for UEFI mode. For those with BIOS/MBR systems, you can refer to the previous version, but keep in mind that it might be outdated and no longer accurate.

If you're only interested in installing Linux and not setting up dual boot with Windows, feel free to skip the Windows-related sections.

@mjnaderi
mjnaderi / django-syslog.md
Created May 29, 2018 07:09
Logging to Syslog in Django
@mjnaderi
mjnaderi / iran_cities.json
Created December 4, 2018 15:59
Iran Provinces and Cities (from http://gndb.ncc.org.ir/Pages/Search.aspx on 2018 Dec 4)
[
{
"id": 1,
"province": "آذربایجان شرقی",
"cities": [
{
"name": "آبش احمد",
"phonetic": "Ābešahmad",
"longitude": "47.3171388",
"latitude": "39.04429447"
@mjnaderi
mjnaderi / actlogger.sh
Created January 25, 2019 14:51
Activity Logger
$ 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
mjnaderi / AnkiCardTemplate.md
Last active May 3, 2022 10:00
Anki Card Template
  • Install "Syntax Highlighting for Code" plugin: https://ankiweb.net/shared/info/1463041493

  • 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 &gt; Manage Note Types &gt; Cards

@mjnaderi
mjnaderi / android_storage_ssh.md
Last active March 15, 2024 07:28
Access Android Storage Remotely using Termux and SSH