Skip to content

Instantly share code, notes, and snippets.

View hanigamal's full-sized avatar
🎯
Focusing at office

Hani Gamal hanigamal

🎯
Focusing at office
View GitHub Profile
@hanigamal
hanigamal / CodeReviewChecklist.md
Created October 19, 2018 15:11 — forked from cartermp/CodeReviewChecklist.md
CASS Code Review Checklist

General Non-Code

  • Does the application compile?
  • Does the application, with changes, run without crashing?
  • Can a database, if applicable, be deployed without error?
  • If a new feature is under review, does the new feature act as expected (if this is easy to test)?
  • Does the commit message indicate the scope of the change set?
  • Does the commit message call out any future work that remains to be done?
  • Does the scope of the change set appear to fulfill the given task, and only that task?
  • Is the change set associated with its appropriate work item?
- General
[ ] The code works
[ ] The code is easy to understand
[ ] Follows coding conventions
[ ] Names are simple and if possible short
[ ] Names are spelt correctly
[ ] Names contain units where applicable
[ ] Enums are used instead of int constants where applicable
[ ] There are no usages of 'magic numbers'
[ ] All variables are in the smallest scope possible
/*
* Copyright (C) 2014 skyfish.jy@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@hanigamal
hanigamal / README.md
Created August 11, 2017 23:57 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@hanigamal
hanigamal / install-node-pi.sh
Created June 29, 2017 03:52 — forked from myrtleTree33/install-node-pi.sh
Install Node JS in 30 seconds for Raspberry Pi / ARM
#!/bin/bash
## Check for versions compiled with ARM at http://nodejs.org/dist/
## Inspired by http://oskarhane.com/raspberry-pi-install-node-js-and-npm/
## Fill in the Node Version here:
##########################################################################
NODE_VERSION="v0.10.21"
#!/bin/bash
sudo apt-get install python g++ make checkinstall fakeroot
src=$(mktemp -d) && cd $src
wget -N http://nodejs.org/dist/node-latest.tar.gz
tar xzvf node-latest.tar.gz && cd node-v*
./configure
sudo fakeroot checkinstall -y --install=no --pkgversion $(echo $(pwd) | sed -n -re's/.+node-v(.+)$/\1/p') make -j$(($(nproc)+1)) install
sudo dpkg -i node_*

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@hanigamal
hanigamal / chrome-bookmarks
Created May 14, 2017 03:07 — forked from selvan/chrome-bookmarks
Chrome extension to export all bookmarks
//manifest.json
{
"name": "bookmark-search-export",
"version": "1.0",
"manifest_version": 2,
"description": "This extention will dump all bookmarks",
"browser_action": {
"default_icon": "icon.png"
},
"background": {

Homebrew Permissions Denied Issues Solution

Installing and fixing node.JS


brew install node

@hanigamal
hanigamal / Add as new Reminder.scpt
Created April 8, 2017 22:44 — forked from oliveratgithub/Add as new Reminder.scpt
Add selected Text as new Reminder in Reminders.app
on run {input, parameters}
-- This code comes from http://raduner.ch/blog/
-- To be used with an Automator Service
-- ------------------------------------------------
set inputText to input as string
tell application "Reminders"
set newremin to make new reminder
set name of newremin to inputText
end tell