Skip to content

Instantly share code, notes, and snippets.

View adel-ezzat's full-sized avatar
😎

Adel ezzat adel-ezzat

😎
View GitHub Profile
@rosswd
rosswd / reset.md
Created June 4, 2019 22:29
SMC and PRAM reset on non T2-Security chip Intel Macbooks

TLDR

  • Power issues, do an SMC reset. Display resolution, sound or startup disk issues, do a PRAM reset.

SMC Reset

  • Apple Menu > Shut Down
  • Shift + Ctrl + Opt (left side) & Power button at the same time. Hold for 10 seconds.
  • Release all keys
  • Power on your Mac

PRAM Reset

@galanteh
galanteh / install.sh
Last active April 2, 2023 18:13
Install Megatools on CentOS 7. Megatools are the commands to be used on linux
#!/bin/bash
yum -y install gcc make glib2-devel libcurl-devel openssl-devel gmp-devel tar automake autoconf libtool wget asciidoc
wget https://megatools.megous.com/builds/megatools-1.10.0-rc1.tar.gz
tar -xzvf megatools*.tar.gz
cd megatools*
./configure
make
make install
# megadl 'https://mega.nz/#xxxxxxxxxxx!'
@adel-ezzat
adel-ezzat / gist:7e4aa8adedd82bd479235bea166e8bbc
Created April 14, 2020 11:04 — forked from snikch/gist:3661188
Find the current top view controller for your iOS application
- (UIViewController *)topViewController{
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController];
}
- (UIViewController *)topViewController:(UIViewController *)rootViewController
{
if (rootViewController.presentedViewController == nil) {
return rootViewController;
}