Skip to content

Instantly share code, notes, and snippets.

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

Mehdi Nourollah mehdinourollah

🏠
Working from home
View GitHub Profile
#! /bin/bash -x
SET_BAUDRATE='-b 2000000'
if [ ! -d autoconf-2.71/root/bin ] ; then
wget https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz
tar -xf autoconf-2.71.tar.xz
pushd autoconf-2.71
./configure --prefix=`pwd`/root
make && make install
@mehdinourollah
mehdinourollah / Telegram_SSH_Login_notifier.md
Created October 13, 2022 16:12 — forked from mmichaelb/Telegram_SSH_Login_notifier.md
"Intelligent" Telegram SSH Login notifier on Linux using PAM

"Intelligent" Telegram SSH Login notifier on Linux using PAM

This login notifier uses IP information to send silent telegram notifications if the login source seem to be trustable.

Telegram Bot setup

First, please read this awesome Medium tutorial on how to setup the Telegram bot.

Telegram Linux setup

@mehdinourollah
mehdinourollah / javascript-proxy-as-rest-client.js
Created July 4, 2022 13:36 — forked from DavidWells/javascript-proxy-as-rest-client.js
Using a javascript proxy as low code REST client
/* Using a JavaScript proxy for a super low code REST client */
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3
// also see https://github.com/fastify/manifetch
// also see https://github.com/flash-oss/allserver
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const createApi = (url) => {
return new Proxy({}, {
get(target, key) {
@mehdinourollah
mehdinourollah / Python-sample.md
Created January 27, 2022 12:56 — forked from hootan09/Python-sample.md
Python Basic Command

Python Basic to Advanced Commands & Code

Some Sample of Python Code for Using

[Virtual env built-in]

$ python -m venv .

#### "windows activation"
c:/> ./Scripts/activate
@mehdinourollah
mehdinourollah / multi-git-win.md
Created August 18, 2021 10:01 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

Setting up github and bitbucket on the same computer (Windows)

Guide for Windows

mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.

Github will be the main account and bitbucket the secondary.

Git for Windows

  • Download and install Git for Windows
    • In the installer, select everything but decide if you want a desktop icon (2nd step)
@mehdinourollah
mehdinourollah / .gitignore
Created July 29, 2021 17:43 — forked from twolfson/.gitignore
Three.js exploration playground
vendor/
//usage
<p>{{ testModel }}</p>
<mySelect v-model="testModel" :options="testSelect" />
// declaration
const mySelect = {
props: ["modelValue", "options"],
emits: ["update:modelValue"],
render() {
data:text/html;charset=utf-8, <title>TextEditor</title><body contenteditable style="font-size:2rem;font-family:monaco;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;" spellcheck="false"><h1>Text Editor</h1><p>Start Here.
@mehdinourollah
mehdinourollah / node_reinstall_macos.txt
Created April 6, 2021 10:00 — forked from dotcomputercraft/gist:b7283bd52f4b5389e748
How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
the best way (I've found) to completely uninstall node + npm is to do the following:
go to /usr/local/lib and delete any node and node_modules
go to /usr/local/include and delete any node and node_modules directory
if you installed with brew install node, then run brew uninstall node in your terminal
check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
go to /usr/local/bin and delete any node executable
You may need to do the additional instructions as well:
sudo rm /usr/local/bin/npm