Skip to content

Instantly share code, notes, and snippets.

View AstmDesign's full-sized avatar
😀
Converting coffee to code

Astm AstmDesign

😀
Converting coffee to code
View GitHub Profile
@AstmDesign
AstmDesign / Development Cycle
Created March 10, 2023 12:11
Development Cycle
1
@AstmDesign
AstmDesign / ubuntu_cleaner.sh
Created February 3, 2023 12:47 — forked from wyodeb/ubuntu_cleaner.sh
Autocleaning .deb based systems
#!/bin/bash
sudo aptitude update
sudo aptitude dist-upgrade
OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)
BLUE="\033[1;33m"
RED="\033[0;31m"
@AstmDesign
AstmDesign / curl.md
Created December 7, 2022 20:42 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@AstmDesign
AstmDesign / test-doc-see-as-virus-by-clamav.txt
Created September 9, 2022 15:09 — forked from mikecastrodemaria/test-doc-see-as-virus-by-clamav.txt
A simple text file to be used as positive test for ClamAv virus scanner
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
#!/bin/bash
#
# World time zones
# Created by Astm Ali | https://github.com/astmdesign
#
# for time zones -> https://www.zeitverschiebung.net/en/city/5332748
# %H ---> for Hours
# cat /etc/timezone ---> Get current time zone
# echo 'Cairo, Egypt:' $(date +"%a %d %B %y %I:%M:%S %P")

Terminator common screens for rails developers

Install Terminator

  1. Copy the below script and save it as terminator.sh
#!/bin/bash
#
# Install Terminator on ubuntu 20.04 LTS
@AstmDesign
AstmDesign / rails_tools.md
Last active August 15, 2023 16:39
Installing Rails local tools on Ubuntu 20.04 LTS

Install needed Rails local tools on Ubuntu 20.04 LTS

For rails developer who working on Ubuntu 20.04 LTS.

Installation by using shell script

  1. Copy the below script and save it as rails_tools.sh

  2. Change the file permission to be executable by using the command

@AstmDesign
AstmDesign / devise.ar.yml
Created November 23, 2020 06:56 — forked from Samidahlawi/devise.ar.yml
devise.ar.yml v4.7.1
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
en:
devise:
confirmations:
confirmed: "تم تأكيد حسابك الشخصي بنجاح."
send_instructions: "سوف تصلك رسالة خلال دقايق على بريدك الإلكتروني تتضمن الخطوات اللازمة لتأكيد حسابك."
send_paranoid_instructions: "إذا كان بريدك الإلكتروني موجود بالعفل اذا سوف تصلك رسالة خلال دقايق تتضمن خطوات اللازمة لتأكيد حسابك."
failure:
already_authenticated: "تم تسجيل دخولك مُسبقاً."
#!/bin/bash
#
# Install Rails 5.2.4 & Ruby 2.6.4 server environment
# Created by Astm Ali | https://github.com/astmdesign
#
clear
echo "$(tput setaf 201)--------------------------------"
echo "Install Rails 5.2.4 & Ruby 2.6.4 server environment As $(whoami) user"
@AstmDesign
AstmDesign / rails http status codes
Created March 23, 2020 23:24 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing