Skip to content

Instantly share code, notes, and snippets.

View numb95's full-sized avatar
🎯
Focusing

AmirHossein Goodarzi numb95

🎯
Focusing
View GitHub Profile
@numb95
numb95 / gist:d35f7be9a1d4cea5f152e58d29bbdf5b
Created September 12, 2022 16:29
upload artifacts in slack channel
- export NOW=$(date "+%Y/%m/%d_%H:%M:%S")
- ./gradlew AssembleRelease
- cd app/build/outputs/apk/release/
- |
curl \
-F token="${SLACK_TOKEN}" \
-F channels="${SLACK_CHANNEL}" \
-F initial_comment="Hey people! Here is the APK of app. Publish date ${NOW}" \
-F "file=@app-release.apk" \
-H "Authorization: Bearer ${SLACK_TOKEN}" \

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 September 14, 2018 20:41 — forked from weakish/busyroot.sh
#sh script to set up a #chroot #busybox #ssh environment
#!/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

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 February 28, 2024 03:05
Route all internet traffic through Tor

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 
#!/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
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)
#!/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
#!/usr/bin/expect
set userName admin
#یوزرنیم وارد شه
set pass admin
#پسورد وارد شه
#قبل از دستور قبلی تل‌نت بگیر به مودم با این دستوز telnet 192.168.168.1 و ببین که ریبوت کجاست
#اگه توی منوی اصلی که پیش‌روت هست باشه که معمولا هست که هیچ
#اگه نه و توی یه زیر دستور دیگه‌ست مثلا توی زیر دستور sys
#خط بعدی رو از کامنت دربیاردو خط
@numb95
numb95 / README
Last active August 29, 2015 14:09
How to become a Robotic expert (persian)
#**مباحث اولیه**
+ **[تعریف رباتیک] (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)**
#**نیازمند‌ی‌ها**
##نیاز‌مندی‌های علمی
+ **دانش کامپیوتر**