Skip to content

Instantly share code, notes, and snippets.

Rami Al-Ghanmi alghanmi

  • University of Southern California
  • Los Angeles, CA
Block or report user

Report or block alghanmi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
alghanmi /
Created Aug 27, 2019
Obtain Permanent Plex Token
curl -X POST \
-H 'X-Plex-Version: 0.3.0' \
-H 'X-Plex-Product: YOUR PRODUCT NAME' \
-H 'X-Plex-Client-Identifier: YOUR-PRODUCT-ID' \
-H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \
--data-urlencode 'user[password]=PLEX_PASSWORD' \
--data-urlencode 'user[login]=PLEX_USERNAME' \
alghanmi / clawbotiq_joystick.c
Last active Apr 12, 2018
Clawbot IQ Joystick sample program
View clawbotiq_joystick.c
#pragma config(Motor, port1, leftMotor, tmotorVex393, openLoop, reversed)
#pragma config(Motor, port6, clawMotor, tmotorVex269, openLoop, reversed)
#pragma config(Motor, port7, armMotor, tmotorVex393, openLoop, reversed)
#pragma config(Motor, port10, rightMotor, tmotorVex393, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
task main ()
View dirmngr.conf
keyserver hkps://
alghanmi /
Last active Apr 8, 2018
Prepare a Debian VPS for Ansible Run
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
# Set User information
export _USER="rami"
export _NAME="Rami AlGhanmi"
## Download the RSS feed of a podcast
## Args: $1 -- destination file
## $2 -- URL for podcast feed
## TODO:
## - validate parameters
## - ensure log location exists
alghanmi /
Created Apr 8, 2016
Create a USB drive from ISO image on Mac
# Convert ISO to IMG format
hdiutil convert -format UDRW -o iso-image.img iso-image.iso
# Find USB Drive number N
diskutil list
diskutil unmountDisk /dev/diskN
# Write image to drive /dev/diskN where N is the disk number
sudo dd if=iso-image.img.dmg of=/dev/diskN
View st2_error_log
$ st2 run core.remote hosts= whoami
id: 56847659a8479506930a36d7
status: failed
cmd: whoami
error: "Unable to connect to any one of the hosts: [u''].
alghanmi / ansible.cfg
Last active Apr 8, 2018
Ansible OpenStack Test
View ansible.cfg
inventory = hosts
log_path = logs/ansible.log
host_key_checking = no
record_host_keys = no
ssh_args = -o ControlMaster=auto -o ControlPersist=30m
gather_facts = smart
library = /opt/ansible/lib:

Keybase proof

I hereby claim:

  • I am alghanmi on github.
  • I am alghanmi ( on keybase.
  • I have a public key whose fingerprint is 5D5C 9B66 CD3F 045E 5713 9719 DD6D 428C 47F6 44E8

To claim this, I am signing this object:

##Install some extra packages for FPM
sudo aptitude install php5-fpm php5-gd php5-mcrypt
##Tigten PHP security
#Disable path info
sudo cp /etc/php5/fpm/php.ini /etc/php5/fpm/php.ini.default
sudo sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/php5/fpm/php.ini
#Change PHP to use sockets instead of ports --already done by default in Debian & Ubuntu
You can’t perform that action at this time.