Skip to content

Instantly share code, notes, and snippets.

View ihatem's full-sized avatar

Hatem ihatem

View GitHub Profile
@ihatem
ihatem / convert_ova_docker.md
Last active October 2, 2024 14:35
Convert a VirtualBox ova file to a Docker image
@ihatem
ihatem / install_ipa_native.md
Last active November 24, 2020 18:42
Install ipa without Appsync Unifed (jailbroken device)

⚠️ This is the unsafe way to install ipa on ios, make sure the file you download is safe, don't download IPAs from fishy websites, only from devs.

Rename ipa extension to zip to extract it later

mv app.ipa app.zip

copy zip file to iphone

scp app.zip [email protected]:/User/Downloads
@ihatem
ihatem / install_tailwind_react.md
Last active July 25, 2020 13:13
Install tailwind with React.js

install dependencies

yarn add -D tailwindcss postcss-cli autoprefixer 

init tailwind.js file (--full: all options)

npx tailwindcss init tailwind.js --full

create postcss.config.js file in root directory

@ihatem
ihatem / Batch-MakeMKV.md
Last active April 4, 2020 21:47
makemkvcon batch convert iso files

cd into ISOs files folder

cd path/to/isos/folder

loop all ISO files and convert them to mkv

# use all ISO childs 
for x in $(find . -name '*.ISO'); do 
 # make dir of /output/path/ISO_FILE.ISO/*.mkv
@ihatem
ihatem / mountTimeMachine.md
Created August 17, 2019 11:29
Mount my Time Machine volume from terminal

Unlock coreStorage volume

$ diskutil coreStorage unlockVolume 1F8F6D8B-55E7-45E6-973D-F55B09115C65

Mount disk

$ diskutil mount disk5
@ihatem
ihatem / flac2m4a.sh
Last active November 20, 2019 16:43
Convert FLAC to M4A with cover and metadata conservation with FFMPEG.
#!/bin/bash
# for m in *.flac; do ffmpeg -nostdin -i "$m" -c:a alac -c:v copy "${m%.*}.m4a"; done
for m in *.flac; do ffmpeg -i "$m" -c:a alac -c:v copy "${m%.flac}.m4a"; done
@ihatem
ihatem / create-bootable-windows-osx.md
Last active July 2, 2019 11:36
Create a bootable windows 10 usb disk in macOS

list disks

diskutil list

unmount that disk by entering

diskutil unmountDisk /dev/diskN
@ihatem
ihatem / README.md
Created June 3, 2019 19:59
VIDEO_TS to Ripped MKV

VIDEO_TS to Ripped MKV

  • The ffmpeg command is in ffmpeg package, from rpmfusion free. It's not in Fedora proper because of patent issues, I believe.
  • -i concat:VTS_01_1.VOB\|VTS_01_2.VOB\|VTS_01_3.VOB marks that input file is a direct join of the three VOB files listed, the backslash is to escape the "|" so that it's seen by ffmpeg instead of bash.
  • -map 0:v tells that ALL video streams are to be copied/transcoded.
  • -map 0:a tells that ALL audio streams are to be copied/transcoded.
  • -c:v libx264 tells that for video streams we'll use libx264 codec (i. e. we'll transcode to h264).
@ihatem
ihatem / change-mac-adress.sh
Created April 8, 2019 23:24
Generate mac adress with randomized hex
#! /bin/bash
CURRENT=`ifconfig en1 | grep ether | cut -c8-24`
RANDOM=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
echo "Current MAC Adress : $CURRENT"
echo "Random MAC Adress : $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')"
printf "Continue Y/N? "; read res
if [[($res == "Y")]]; then
sudo ifconfig en1 ether $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
else
echo "quitting..."