This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Microsoft Excel" | |
set screen updating to false -- optimize performance | |
set range_selected to selection | |
-- setup ref vars for selection | |
tell selection to set {range_selected_row_index, range_selected_column_index, range_selected_row_count, range_selected_column_count} to {get first row index of selection, get first column index of selection, get count rows of selection, get count columns of selection} | |
-- go column by column and iterate each row in each column | |
repeat with column_step from range_column_index to range_column_count -- column iteration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xset -display :0.0 -dpms # disable Energy Star (DPMS) features (+dpms enables them) | |
xset -display :0.0 s blank # screen-saver control {blank,noblank,off} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assumes you installed pacman -S alsa-utils | |
/usr/bin/amixer set 'PCM' 100% unmute |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
echo "dtparam=audio=on" >> /boot/config.txt | |
echo "audio_pwm_mode=2" >> /boot/config.txt | |
echo "disable_audio_dither=1 # remove analog audible background hiss at low volume (did not work for me)" >> /boot/config.txt | |
echo "#hdmi_drive=1 # 1: DVI (no sound) 2: HDMI (sound if supported and enabled)" >> /boot/config.txt | |
echo "#amixer cset numid=3 1 # Did not work for me 0=auto 1=analog 2=HDMI (careful, number directly after = should be 2)" >> /boot/config.txt | |
echo "# Force analog audio" >> /boot/config.txt | |
echo "hdmi_ignore_edid_audio=1" >> /boot/config.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description = Kodi Media Center | |
# if you don't need the MySQL DB backend, this should be sufficient | |
After = systemd-user-sessions.service network.target sound.target | |
# if you need the MySQL DB backend, use this block instead of the previous | |
# After = systemd-user-sessions.service network.target sound.target mysql.service | |
# Wants = mysql.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup Raspberry Pi 3 from Arch Linux Tarball | |
# Setup wlan wpa_supplicant conf | |
#WLANSSID="" | |
#WLANPASSWD="" | |
echo "network={\n ssid=$WLANSSID\n $WLANPASSWD\n}" > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf | |
systemctl enable [email protected] | |
systemctl start [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description = Start instance of desktop environment on tty1/vt1 | |
After=systemd-user-sessions.service network.target sound.target | |
[email protected] | |
[Service] | |
User = jonathan | |
Group = admin | |
PAMName = login | |
Type = simple |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Shares wifi with bridge device. You could also use a physical eth device, or just bind any other phy. device to bridge. | |
# This assumes you setup a network device called br0 and your wlan device is called wlan0. I just used systemd-networkd files | |
# under /etc/systemd/network. You also need to setup a DNS server on br0. I used dnsmasq as my DNS and DHCP server with "interface=br0" and | |
# "dhcp-range=192.168.4.50,192.168.4.150,12h" in the config /etc/dnsmasq.conf. Your br0 should correspond to subnet mask in dnsmasq.conf | |
# in my case "192.168.4.1 | |
if [[ $(/usr/bin/id -u) -ne 0 ]]; then | |
echo "Not running as root" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enable the X Display Manager Control Protocol Server | |
[XDMCPServer] | |
enabled=true | |
port=177 | |
# Set start-default-seat to false to allow lightdm to run in the background | |
[LightDM] | |
start-default-seat=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sym link from /etc/systemd/system/xvnc.socket | |
# to /etc/systemd/system/socket.target.wants to enable | |
[Unit] | |
Description=XVNC Server | |
[Socket] | |
ListenStream=5900 | |
Accept=yes |