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/bash | |
FILES=/dev/hidraw* | |
for f in $FILES | |
do | |
FILE=${f##*/} | |
DEVICE="$(cat /sys/class/hidraw/${FILE}/device/uevent | grep HID_NAME | cut -d '=' -f2)" | |
if [[ "$DEVICE" == *"Keychron"* ]]; then | |
echo "Enabling VIA access for $DEVICE." | |
chmod a+rw /dev/$FILE |
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
$windowTitle = "Xonar Essence ST Audio Center" | |
$currentOutput = ControlCommand($windowTitle, "", "[CLASS:ComboBox; INSTANCE:5]", "GetCurrentSelection") | |
$newOutput = stringinstr($currentOutput, "Headphone") ? "2 Speakers" : "Headphone" | |
ControlCommand($windowTitle, "", 2401, "SelectString", $newOutput) |
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
sudo find / -name 'filename.file' -exec rm -i {} \; |
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
colorscheme:symfony | |
cs_re:yellow:"[^"\\]*(\\.[^"\\]*)*" | |
cs_re:cyan:^\[....-..-.. ..:..:..\] | |
cs_re:green:.*DEBUG.* | |
cs_re:red:^.*(WARNING|ERROR|CRITICAL).*$ | |
cs_re:blue:.*INFO.* |
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/bash | |
# node.js using PPA (for statsd) | |
sudo apt-get --yes update | |
sudo apt-get --yes install python-software-properties | |
sudo apt-add-repository ppa:chris-lea/node.js | |
sudo apt-get --yes update | |
sudo apt-get --yes install nodejs | |
# Install git to get statsd |
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
rds-modify-db-parameter-group {param-group-name} \ | |
--parameters="name=character_set_server, value=utf8, method=pending-reboot" \ | |
--parameters="name=collation_server, value=utf8_general_ci, method=pending-reboot" \ | |
--parameters="name=tmp_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \ | |
--parameters="name=max_heap_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \ | |
--parameters="name=query_cache_type, value=1, method=pending-reboot" \ | |
--parameters="name=query_cache_size, value=131072, method=pending-reboot" \ | |
--parameters="name=table_open_cache, value=2500, method=pending-reboot" \ | |
--parameters="name=join_buffer_size, value={DBInstanceClassMemory/64}, method=pending-reboot" \ | |
--parameters="name=thread_cache_size, value={DBInstanceClassMemory/12582880}, method=pending-reboot" \ |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings] | |
"Present"=dword:00000001 | |
"HostName"="" | |
"LogFileName"="putty.log" | |
"LogType"=dword:00000000 | |
"LogFileClash"=dword:ffffffff | |
"LogFlush"=dword:00000001 | |
"SSHLogOmitPasswords"=dword:00000001 |
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
public static class IEnumerableExtensions { | |
public static IEnumerable<TSource> Alternate<TSource>(this IEnumerable<TSource> self, IEnumerable<TSource> with) { | |
using (var selfEnumerator = self.GetEnumerator()) | |
using (var withEnumerator = with.GetEnumerator()) { | |
bool selfHasCurrent; | |
bool withHasCurrent; | |
do { | |
selfHasCurrent = selfEnumerator.MoveNext(); |