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
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://hkps.pool.sks-keyservers.net
@alghanmi
alghanmi / vps_prep.sh
Last active Apr 8, 2018
Prepare a Debian VPS for Ansible Run
View vps_prep.sh
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
# Set User information
export _USER="rami"
export _NAME="Rami AlGhanmi"
View podcast_sync.sh
#!/bin/bash
##
## Download the RSS feed of a podcast
## Args: $1 -- destination file
## $2 -- URL for podcast feed
## TODO:
## - validate parameters
## - ensure log location exists
@alghanmi
alghanmi / macos_iso_to_usb.sh
Created Apr 8, 2016
Create a USB drive from ISO image on Mac
View macos_iso_to_usb.sh
# 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=100.73.114.124 whoami
.
id: 56847659a8479506930a36d7
status: failed
parameters:
cmd: whoami
hosts: 100.73.114.124
result:
error: "Unable to connect to any one of the hosts: [u'100.73.114.124'].
@alghanmi
alghanmi / ansible.cfg
Last active Apr 8, 2018
Ansible OpenStack Test
View ansible.cfg
[defaults]
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:
View keybase.md

Keybase proof

I hereby claim:

  • I am alghanmi on github.
  • I am alghanmi (https://keybase.io/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:

View dokuwiki-setup.sh
#!/bin/bash
##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
@alghanmi
alghanmi / wps_openwrt.sh
Last active Jul 16, 2019
WPS on OpenWRT -- Enabling Wi-Fi Protected Setup on OpenWRT
View wps_openwrt.sh
##
## WPS on OpenWRT
## This script enables Wi-Fi Protected Setup on OpenWRT.
##
## Resources
## http://wiki.openwrt.org/doc/uci/wireless#wps.options
##
#Install the full wpad package
opkg update
You can’t perform that action at this time.