Skip to content

Instantly share code, notes, and snippets.

View abd3lraouf's full-sized avatar
🌴
On vacation

Abdelraouf Sabri abd3lraouf

🌴
On vacation
View GitHub Profile
@abd3lraouf
abd3lraouf / Readme.md
Last active March 31, 2021 09:39 — forked from damokuro/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH

Introduction

converts git remote from https to ssh using sed

One line

wget https://bit.ly/https_ssh_manoo -O- | bash

Features:

  1. Downlaod
We couldn’t find that file to show.
@abd3lraouf
abd3lraouf / ColorUtils.java
Created November 30, 2020 10:30 — forked from XiaoxiaoLi/ColorUtils.java
Java Code to get a color name from rgb/hex value/awt color. The part of looking up a color name from the rgb values is edited from * https://gist.github.com/nightlark/6482130 by Ryan Mast (nightlark)
import java.awt.Color;
import java.util.ArrayList;
/**
* Java Code to get a color name from rgb/hex value/awt color
*
* The part of looking up a color name from the rgb values is edited from
* https://gist.github.com/nightlark/6482130#file-gistfile1-java (that has some errors) by Ryan Mast (nightlark)
*
* @author Xiaoxiao Li
@abd3lraouf
abd3lraouf / cronlist.sh
Created October 14, 2020 00:58 — forked from islander/cronlist.sh
Script to list all cron events on a system - found on stackoverflow.com: http://bit.ly/nkFwD9 Modified from original to list /etc/anacron jobs
#!/bin/bash
# System-wide crontab file and cron job directory. Change these for your system.
CRONTAB='/etc/crontab'
ANACRONTAB='/etc/anacrontab'
CRONDIR='/etc/cron.d'
# Single tab character. Annoyingly necessary.
tab=$(echo -en "\t")

First of all you need to open terminal and install Tor:

sudo apt-get install tor

Then check that the tor is install successfully or not by:

service tor status

If the server was not run then run by:

service tor start

After runing tor you can see the log of the tor by

@abd3lraouf
abd3lraouf / iso-maker.ps1
Created August 6, 2020 02:59
Create Iso from PS>5
function New-IsoFile
{
[CmdletBinding(DefaultParameterSetName='Source')]Param(
[parameter(Position=1,Mandatory=$true,ValueFromPipeline=$true, ParameterSetName='Source')]$Source,
[parameter(Position=2)][string]$Path = "$env:temp\$((Get-Date).ToString('yyyyMMdd-HHmmss.ffff')).iso",
[ValidateScript({Test-Path -LiteralPath $_ -PathType Leaf})][string]$BootFile = $null,
[ValidateSet('CDR','CDRW','DVDRAM','DVDPLUSR','DVDPLUSRW','DVDPLUSR_DUALLAYER','DVDDASHR','DVDDASHRW','DVDDASHR_DUALLAYER','DISK','DVDPLUSRW_DUALLAYER','BDR','BDRE')][string] $Media = 'DVDPLUSRW_DUALLAYER',
[string]$Title = (Get-Date).ToString("yyyyMMdd-HHmmss.ffff"),
[switch]$Force,
[parameter(ParameterSetName='Clipboard')][switch]$FromClipboard
@abd3lraouf
abd3lraouf / Readme.md
Last active November 27, 2019 08:22
AndroidX manual Migration script

Procedure

  1. Open terminal from android studio or navigate to the projet's root directory

Long link

  1. curl -s -L https://gist.githubusercontent.com/AbdElraoufSabri/907163eecbb87e7ca033d01004623c05/raw/executor.sh | bash

short link

  1. curl -s -L https://git.io/JevZ4 | bash

short link #2

@abd3lraouf
abd3lraouf / toogle-snapd-service.sh
Last active August 21, 2019 08:57
shell script to toggle snapd service on ubuntu 18.04
#!/usr/bin/env bash
if systemctl list-units | grep -q -E 'snapd.service.*running'; then
sudo systemctl stop snapd.service > /dev/null 2>&1
sudo systemctl disable snapd.service > /dev/null 2>&1
sudo systemctl mask snapd.service > /dev/null 2>&1
sudo rm -rf /etc/xdg/autostart/snap-userd-autostart.desktop
echo
tput setaf 1; echo "snapd stopped successfully"
@abd3lraouf
abd3lraouf / media-query.css
Created August 7, 2017 20:43 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
This file has been truncated, but you can view the full file.
{"dependencies_cache": {"https://packagecontrol.io/repository.json": [{"releases": [{"url": "https://bitbucket.org/teddy_beer_maniac/sublime-text-dependency-jinja2/get/2.8.0.zip", "platforms": ["*"], "version": "2.8.0", "sublime_text": "*"}], "load_order": "51", "issues": "https://bitbucket.org/teddy_beer_maniac/sublime-text-dependency-jinja2/issues", "description": "Python Jinja2 module", "authors": ["teddy_beer_maniac"], "name": "python-jinja2"}, {"releases": [{"url": "https://codeload.github.com/idleberg/sublime-xmltodict/zip/0.10.2", "platforms": ["*"], "version": "0.10.2", "sublime_text": "*"}], "load_order": "50", "issues": "https://github.com/idleberg/sublime-xmltodict/issues", "description": "Makes working with XML feel like you are working with JSON - https://github.com/martinblech/xmltodict", "authors": ["idleberg"], "name": "xmltodict"}, {"releases": [{"url": "https://codeload.github.com/randy3k/sublime-xdotool/zip/v3.20160714.1", "platforms": ["linux"], "version": "3.20160714.1", "sublime_text": "