Skip to content

Instantly share code, notes, and snippets.

maty974 /
Created Apr 25, 2020 — forked from tbutts/
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./ ~/.tmux.conf.orig > ~/.tmux.conf
maty974 / csv-to-icloud-keychain.applescript
Created Oct 3, 2018
Password csv to import to iCloud keychain
View csv-to-icloud-keychain.applescript
-- select the csv to import to iCloud keychain
set theFile to (choose file with prompt "Select the CSV file")
-- read csv file
set f to read theFile
-- split lines into records
set recs to paragraphs of f
-- open safari passwords screen, check it is unlocked, do not allow to proceed until it is unlocked or user clicks cancel.
maty974 /
Created Mar 11, 2018 — forked from furui/
Set xbacklight to ACPI brightness (ROG GL702VM but probably GL502VM as well)
while true
inotifywait -e modify /sys/class/backlight/acpi_video0/brightness
echo brightness set to: $(cat /sys/class/backlight/acpi_video0/brightness)
xbacklight -set $(cat /sys/class/backlight/acpi_video0/brightness)
maty974 /
Last active Dec 7, 2018
Centos 7 on ASUS GL703VM - Tips & Workaround

ASUS GL703VM tips & Workaround


Not working:

  • Fn+F12 : airplane mode
  • Fn+F11 : sleep mode
  • Fn + F7-8 : lcd backlight brightness
  • Fn+F5 : fan turbo mode?
# Install for all users:
# $ wget --no-check-certificate -P /etc/bash_completion.d
# Install for one user:
# $ wget --no-check-certificate -P ~
# $ echo "\n\n# Bash Git Prompt\nsource ~/" >> ~/.bashrc
# $ . ~/.bashrc
# Settings:
maty974 /
Created Feb 15, 2018 — forked from walkerjeffd/
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
maty974 / gist:c076ff829063f70db3d9
Last active Feb 1, 2018
nuke update fbx knobs without popup message
View gist:c076ff829063f70db3d9
# save current fbx take and node name knob
# set knob flag NO_KNOB_CHANGED to avoid popup message
View gist:fd165aee501d1d8a8bf0
[Thread 0x7f3a56ffd700 (LWP 3750) exited]
[New Thread 0x7f3a56ffd700 (LWP 3789)]
[Thread 0x7f3c4ca8c700 (LWP 3685) exited]
[Thread 0x7f3b9e7fc700 (LWP 3723) exited]
[Thread 0x7f3c4d28d700 (LWP 3684) exited]
[New Thread 0x7f3c4d28d700 (LWP 3791)]
[Thread 0x7f3c4d28d700 (LWP 3791) exited]
[Thread 0x7f3a757fa700 (LWP 3746) exited]
[Thread 0x7f3a74ff9700 (LWP 3747) exited]
maty974 / gist:bb08fde11d52926c0808
Created Sep 12, 2014
nuke9 - widget Pane loose scroll focus example
View gist:bb08fde11d52926c0808
import PySide.QtGui as QtGui
class SampleScrollWidget(QtGui.QListWidget):
def __init__(self, parent=None):
QtGui.QListWidget.__init__(self, parent)
def add_random_items(self):
maty974 / gist:66e29df303d1f1825a53
Last active May 3, 2016
QSortFilterProxyModel and QListView - indexWidget get deleted when filtering
View gist:66e29df303d1f1825a53
import PySide.QtGui as QtGui
import PySide.QtCore as QtCore
_DEFAULT_ITEM_SIZE = QtCore.QSize(100, 85)
_USER_ROLE = QtGui.QStandardItem.UserType + 1
class CustomItemWidget(QtGui.QWidget):
def __init__(self, parent=None):
super(CustomItemWidget, self).__init__(parent=parent)
You can’t perform that action at this time.