Skip to content

Instantly share code, notes, and snippets.

Jamie York ziadoz

Block or report user

Report or block ziadoz

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
@ziadoz
ziadoz / install.sh
Last active Sep 20, 2019
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
View install.sh
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
@ziadoz
ziadoz / reloadvhosts.sh
Last active Jan 11, 2017
Automatically Symlink Virtualhosts
View reloadvhosts.sh
# Symlink web server virtualhost configutions into the sites-enabled directory.
# Usage: reloadvhosts /path/to/websites
# reloadvhosts /path/to/websites *-live.conf
# reloadvhosts /path/to/websites apache2
reloadvhosts() {
local vhost_dir=${1:-/var/www/vhosts}
local conf_name=${2:-*dev.conf}
local web_server=${3:-nginx}
sudo find /etc/$web_server/sites-enabled/ -type l -exec rm {} \;
@ziadoz
ziadoz / amd-audio-fix.md
Last active Sep 14, 2016
Fix AMD HDMI audio lost after monitor standby
View amd-audio-fix.md

Fix AMD HDMI audio lost after monitor standby

The quickest solution to this issue is to disable and then re-enable the AMD High Definition Audio Device in the Device Manager. However it's possible to create a handy desktop shortcut:

Download DevManView and put the files in C:\Program Files\NirSoft.

Create a file called Restart AMD Audio.bat on the desktop with the following contents:

"C:\Program Files\NirSoft\DevManView.exe" /disable_enable "AMD High Definition Audio Device"
@ziadoz
ziadoz / raspberry-pi-3.md
Last active Dec 14, 2016
Raspberry Pi 3 Setup
View raspberry-pi-3.md
@ziadoz
ziadoz / fix-osx-wifi-battery-drain.md
Last active May 3, 2019
Fix OSX battery draining on sleep due to wifi activity
View fix-osx-wifi-battery-drain.md

Fix OSX battery draining on sleep due to wifi activity

Install SleepWatcher using Homebrew:

sudo chown -R $(whoami) /usr/local
brew update
brew install sleepwatcher

Start the SleepWatcher service:

@ziadoz
ziadoz / fix-xbox-one-controller-windows-10.md
Last active Apr 23, 2019
Fix Xbox One Controller issues after Windows 10 Anniversary update
View fix-xbox-one-controller-windows-10.md

Fix Xbox One Controller on Windows 10 Anniversary

After the Windows 10 Anniversary update Xbox One Controllers may start showing up as two XInput devices in Steam, and button presses occur twice.

To fix this you need to patch in the xinputhid.sys file from an earlier Windows 7 driver.

Note: This fix only works for connecting the controller via USB cable or USB wireless adapter, the new Bluetooth controller when paired still doesn't work.

Download the Windows 7 Driver

@ziadoz
ziadoz / fix-samsung-macbook-retina-picture.md
Last active Jul 12, 2016
Fix Samsung monitor (T22D390) as external display for a Macbook Pro Retina producing blurry picture
View fix-samsung-macbook-retina-picture.md

Fix Samsung monitor (T22D390) as external display for a Macbook Pro Retina producing blurry picture

If plugging your Macbook Pro Retina into your Samsung monitor using HDMI is producing a blurry picture with illegible fonts, this is how to fix it.

  1. Switch to the input source that your laptop is connected to.
  2. Press the "Sources" on your remote/monitor.
  3. Navigate to the small square in the top right hand corner of the sources list called "Tools".
  4. Choose the "Edit Name" option for the input source.
  5. Change it to "PC" or "PC DVI"
  6. Enjoy!
@ziadoz
ziadoz / photos.sh
Last active Aug 24, 2019
OS X Photos - View Raw Photos in Finder
View photos.sh
#!/usr/bin/env bash
# Make the OS X Photos Library viewable as a folder called Raw in ~/Pictures
cd ~/Pictures
mkdir Raw
ln -s ~/Pictures/Photos\ Library.photoslibrary/Masters/ Raw
@ziadoz
ziadoz / XmlElement.php
Created Aug 26, 2015
Simple XML Element Builder (Proxies to SimpleXMLElement class)
View XmlElement.php
<?php
use \SimpleXMLElement;
use \BadMethodCallException;
class XmlElement
{
/**
* The default XML DOCTYPE.
*
* @var string
@ziadoz
ziadoz / composer_path.json
Last active Sep 11, 2019
Composer Using Local Repositories and Branches
View composer_path.json
{
"repositories": [
{
"type": "path",
"url": "../relative/project/path"
}
],
"require": {
"${project}": "dev-${branch}"
}
You can’t perform that action at this time.