Skip to content

Instantly share code, notes, and snippets.

View Migacz85's full-sized avatar

Marcin Mrugacz Migacz85

  • Dublin
View GitHub Profile
@Migacz85
Migacz85 / gist:d4439b5de616bc4d329917370be85c3f
Last active March 6, 2019 13:10
Django settings default file
"""
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
import dj_database_url
# from whitenoise.django import DjangoWhiteNoise
chdir(/etc)
fchdir() to previous dir
sourcing "/etc/vimrc"
line 1: " All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
line 2: " /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
line 3: " you can find below. If you wish to change any of those settings, you should
line 4: " do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
line 5: " everytime an upgrade of the vim packages is performed. It is recommended to
line 6: " make changes after sourcing archlinux.vim since it alters the value of the
line 7: " 'compatible' option.
@Migacz85
Migacz85 / gist:8ef1478328c0659e11fddd47a0d72e29
Created November 28, 2018 16:34
I3 script for external monitor
#!/bin/bash
EXTERNAL_OUTPUT="HDMI1"
INTERNAL_OUTPUT="eDP1"
# if we don't have a file, start at zero
if [ ! -f "/tmp/monitor_mode.dat" ] ; then
monitor_mode="all"
# otherwise read the value from the file
else
@Migacz85
Migacz85 / autorotation.sh
Last active March 18, 2023 18:31
Autorotation of your linux display script. Tested on Manjaro KDE, firstly go to https://github.com/hadess/iio-sensor-proxy, make and install (dont worry that is for GNOME ). When installed correctly monitor-sensor should work from command line giving you outputs from sensors. On the end make that script, and execute. It should work. Enjoy :)
#!/bin/bash
#This script will automaticly rotate your screen and change correctly touches from the screen.
#Before running the script:
#go to https://github.com/hadess/iio-sensor-proxy and and follow all steps to install the code.
#find your TOUCHPAD, and TRANSFORM, variables. You can find them using
#typing in terminal:
#xinput list
#tested on hp x360 13s-s150sa, manjaro kde
#in case when you dont want install iio-sensor-proxy you can use this script:
#https://gist.github.com/tuxflo/5b400c86a5ebde871d94c6bff94ad6cb