Skip to content

Instantly share code, notes, and snippets.

View ginnun's full-sized avatar

Hızır Sefa İrken ginnun

View GitHub Profile
@nightuser
nightuser / use_existing_session.patch
Last active April 26, 2024 13:22
Use existing Xorg session for chrome-remote-desktop
Add an option to use the existing Xorg session with
chrome-remote-desktop.
The original idea of the patch: https://superuser.com/a/850359
--- a/chrome-remote-desktop 2024-03-27 16:03:20.518579015 +0000
+++ b/chrome-remote-desktop 2024-03-27 16:17:58.241912847 +0000
@@ -110,6 +110,8 @@
X_LOCK_FILE_TEMPLATE = "/tmp/.X%d-lock"
FIRST_X_DISPLAY_NUMBER = 20
@GreenSkunk
GreenSkunk / fix-drupal8-permissions.sh
Last active April 30, 2024 14:01
Drupal - Bash shell script to fix Drupal 8 permissions where the PHP Handler is FastCGI.
#!/bin/bash
path=${1%/}
user=${2}
group=${2}
help="\nHelp: This script is used to fix permissions of a Drupal 8 installation in which the PHP Handler is FastCGI\nYou need to provide the following arguments:\n\t 1) Path to your drupal installation\n\t 2) Username of the user that you want to give files/directories ownership\n\nNote: This script assumes that the group is the same as the username if your PHP is compiled to run as FastCGI. If this is different you need to modify it manually by editing this script or checking out forks on GitHub.\nUsage: bash ${0##*/} drupal_path user_name\n"
echo "Refer to https://www.Drupal.org/node/244924"
@cardil
cardil / Installation.sh
Last active September 5, 2018 09:46
Linux NVidia Optimus with external monitor - enable/disable scripts tested on Ubuntu. Source article: http://www.unixreich.com/blog/2013/linux-nvidia-optimus-on-thinkpad-w520w530-with-external-monitor-finally-solved
# You will need latest NVIDIA drivers installed. At the time of writing, version is 331.20.
# On ubuntu 13.10, it looks like this:
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-331
# Now we need to install bumblebee:
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get install bumblebee bumblebee-nvidia bbswitch-dkms