Skip to content

Instantly share code, notes, and snippets.

View sufyanm's full-sized avatar

Sufyan Muhammad sufyanm

View GitHub Profile
@sufyanm
sufyanm / .zshrc
Last active February 1, 2020 01:24
# ~/.zshrc
# Configure auto completion
autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
# Configure prompt
autoload -U promptinit; promptinit

Keybase proof

I hereby claim:

  • I am sufyanm on github.
  • I am sufyanm (https://keybase.io/sufyanm) on keybase.
  • I have a public key whose fingerprint is 5DD9 11DB FF1B 69F7 CD82 259A 8C31 9AB3 1072 A456

To claim this, I am signing this object:

@sufyanm
sufyanm / bootable_iso.bash
Last active November 4, 2018 01:15
Make bootable USB from ISO on MacOS X with dd
diskutil list
# target disk has the identifier disk2s1
sudo diskutil unmount /dev/disk2s1
# note the r before disk2s1
sudo dd if=Fedora-Workstation-Live-x86_64-29-1.2.iso of=/dev/rdisk2s1 bs=1m
# docker pull registry.access.redhat.com/rhel
# Using default tag: latest
# Trying to pull repository registry.access.redhat.com/rhel ...
# open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory
cat << EOF > /etc/rhsm/ca/redhat-uep.pem
-----BEGIN CERTIFICATE-----
MIIG/TCCBOWgAwIBAgIBNzANBgkqhkiG9w0BAQUFADCBsTELMAkGA1UEBhMCVVMx
FzAVBgNVBAgMDk5vcnRoIENhcm9saW5hMRYwFAYDVQQKDA1SZWQgSGF0LCBJbmMu
MRgwFgYDVQQLDA9SZWQgSGF0IE5ldHdvcmsxMTAvBgNVBAMMKFJlZCBIYXQgRW50
@sufyanm
sufyanm / openjdk11.sh
Created September 26, 2018 09:34
Install OpenJDK 11 on macOS
# Download from http://jdk.java.net/11/
mv jdk-11.jdk/ /Library/Java/JavaVirtualMachines/
@sufyanm
sufyanm / mirror.sh
Last active April 14, 2017 07:18
Package Mirror
yum -y install createrepo rsync httpd
systemctl enable httpd
systemctl start httpd
mkdir -p /var/www/html/centos/7/os/x86_64/
rsync -avzH --delete rsync://mirror.rackspace.com/centos/7/os/x86_64/ /var/www/html/centos/7/os/x86_64/
mkdir -p /var/www/html/centos/7/updates/x86_64/
rsync -avzH --delete rsync://mirror.rackspace.com/centos/7/updates/x86_64/ /var/www/html/centos/7/updates/x86_64/
alter profile DEFAULT limit PASSWORD_REUSE_TIME unlimited;
alter profile DEFAULT limit PASSWORD_LIFE_TIME unlimited;
pssh -h hosts.txt -A -l sufyanm -P -I < script.sh
@sufyanm
sufyanm / keygen.sh
Last active March 22, 2017 07:47
Generate SSH keys
ssh-keygen -t ed25519 -o -a 100
ssh-keygen -t rsa -b 4096 -o -a 100