Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

AmirHossein Goodarzi numb95

🎯
Focusing
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am numb95 on github.
  • I am numb95 (https://keybase.io/numb95) on keybase.
  • I have a public key ASAZQmTslMaZxTpZQjL4GF0icVyUqP733_4G_eKyUNK60Ao

To claim this, I am signing this object:

@numb95
numb95 / busyroot.sh
Created Sep 14, 2018 — forked from weakish/busyroot.sh
#sh script to set up a #chroot #busybox #ssh environment
View busyroot.sh
#!/bin/sh
# by Jakukyo Friel <weakish@gmail.com> under GPL v2.
### Set up a chroot busybox SSH environment
## requires
# wget -- to download pubkey and busybox
# sharutils -- to generate random password
## Config
View block-ip-from-ansible-with-iptables.md

Create a file with a name ip.txt. add you IPs which you want to block them to this file. Just one IP per line. Add this block to your task file.

- name: block IP with iptables
  iptables:
    chain: INPUT
    source: '{{ item }}'
    jump: DROP
  with_lines: 
@numb95
numb95 / route-all-traffic-through-tor.md
Last active Feb 7, 2021
Route all internet traffic through Tor
View route-all-traffic-through-tor.md

Do not use in production Server or if you don't know what iptables do

Add this to torrc ( located on /etc/tor/torrc):

VirtualAddrNetwork 10.192.0.0/10

AutomapHostsOnResolve 1

TransPort 9051 
View postgresql_backup.sh
#!/bin/bash
# Daily Backup
#You can add script to Cron
BACKUP_DIR=/home/conf/backup/db
DAYS_TO_KEEP=30
PROJECT_NAME=project
FILE_SUFFIX=_pg_backup.sql
DATABASE=
USER=postgres
View gitlab_group_batch_clone.py
import requests
import json
import os
url = "https://gitlab.com/api/v4/groups/GROUPNAME/projects?per_page=100"
headers = {
'private-token': "TOKEN_GET_FROM_GITLAB"
}
response = requests.request("GET", url, headers=headers)
View MYSQL_Backup.sh
#!/bin/sh
# init. the projects informations
PROJECT=PROJECT_NAME
FILE=$PROJECT.`jdate +%Y-%m-%d`.sql
DBSERVER=DATABASE_SERVER
DATABASE=DBNAME
USER=DBUSER
PASS=dbpassword
#in case you run this more than once a day, remove the previous version of the file
View telnet.sh
#!/usr/bin/expect
set userName admin
#یوزرنیم وارد شه
set pass admin
#پسورد وارد شه
#قبل از دستور قبلی تل‌نت بگیر به مودم با این دستوز telnet 192.168.168.1 و ببین که ریبوت کجاست
#اگه توی منوی اصلی که پیش‌روت هست باشه که معمولا هست که هیچ
#اگه نه و توی یه زیر دستور دیگه‌ست مثلا توی زیر دستور sys
#خط بعدی رو از کامنت دربیاردو خط
@numb95
numb95 / README
Last active Aug 29, 2015
How to become a Robotic expert (persian)
View README
#**مباحث اولیه**
+ **[تعریف رباتیک] (http://fa.wikipedia.org/wiki/%D9%85%D9%87%D9%86%D8%AF%D8%B3%DB%8C_%D8%B1%D8%A8%D8%A7%D8%AA%DB%8C%DA%A9)**
#**نیازمند‌ی‌ها**
##نیاز‌مندی‌های علمی
+ **دانش کامپیوتر**