Skip to content

Instantly share code, notes, and snippets.

Avatar
🐺
C/C++/Linux ░▒▓▉▊▋▌▍▎▏

Juuso Alasuutari imaami

🐺
C/C++/Linux ░▒▓▉▊▋▌▍▎▏
View GitHub Profile
@imaami
imaami / altgr_fixed_xmodmaprc.sh
Last active Jan 15, 2019
Create xmodmaprc to make VNC usable
View altgr_fixed_xmodmaprc.sh
#!/bin/bash
#
# This script executes `xmodmap -pke', modifies the output,
# and prints the result to stdout so that it can be used as
# an xmodmaprc file.
#
# The resulting keymap has AltGr remapped to Mode_switch.
# Existing AltGr-modified key combinations are changed to
# match the new mapping.
#
@imaami
imaami / ncd.xml
Created Jan 18, 2019
A Not Completely Disgusting color scheme for Qt Creator
View ncd.xml
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Not Completely Disgusting">
<style name="Text" foreground="#dcdcdc" background="#000000"/>
<style name="Link" foreground="#0055ff"/>
<style name="Selection" background="#3f6e9c" bold="true"/>
<style name="LineNumber" foreground="#569cf1" background="#1b1b1c"/>
<style name="SearchResult" background="#505050"/>
<style name="SearchScope" background="#222200"/>
<style name="Parentheses" foreground="#dcdcdc" background="#0e4583"/>
<style name="ParenthesesMismatch" foreground="#ff5555" background="#3c3c3c"/>
View create_passphrase.sh
#!/bin/bash
num_words="$1"
orig_dict="$2"
dict_file=''
ret_value=0
max_word_len=9 # Exclude words longer than this
phrase_count=6 # How many passphrases to generate
@imaami
imaami / autoexec.cfg
Created May 18, 2019
Steam Proton fixes for Vanguard: Normandy 1944
View autoexec.cfg
con_restricted = 0
con_showonload = 0
sys_DeactivateConsole = 0
bind insert tw_steamrefreshserverlist
bind delete ConsoleShow
r_VSync = 0
; sys_MaxFPS = 60
; Ultra settings except Low object detail for higher FPS
sys_spec_full = 4
@imaami
imaami / squad.sh
Created Jun 9, 2019
Squad launch script
View squad.sh
#!/bin/sh
systemctl --user start pulseaudio
nvidia-settings -a '0/LogAniso=0' \
-a '0/FSAA=9' \
-a '0/TextureClamping=1' \
-a '0/FXAA=0' \
-a '0/AllowFlipping=0' \
-a '0/FSAAAppControlled=0' \
@imaami
imaami / set-systemd-user-environment.sh
Created Aug 24, 2019
Make the user service manager aware of D-Bus etc.
View set-systemd-user-environment.sh
#!/bin/bash
args=()
((n=0))
for v in DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS; do
[[ x${!v} == 'x' ]] || { args[n]="$v=${!v}"; ((n++)); }
done
(( n == 0 )) || /bin/systemctl --user set-environment "${args[@]}"
@imaami
imaami / git-port
Created Aug 31, 2019
Helper scripts for cherry-picking patches with modifications and a "(ported ...)" message
View git-port
#!/bin/bash
usage()
{
cat << EOF
usage: git port [<options>] <commit>
or: git port --continue
EOF
exit $((1))
@imaami
imaami / .Xresources
Created Sep 19, 2019
Xresources for URxvt
View .Xresources
cursor.theme: cursor-theme
Xcursor.size: 16
! black
URxvt.color0 : #2E2E34343636
URxvt.color8 : #555557575353
! red
URxvt.color1 : #CCCC00000000
URxvt.color9 : #EFEF29292929
! green
@imaami
imaami / itak.xml
Created Oct 17, 2019
QtCreator color scheme for Flat Dark
View itak.xml
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Imaami's Ten-Armed Kiwi">
<style name="Text" foreground="#dcdcdc" background="#000000"/>
<style name="Link" foreground="#0055ff"/>
<style name="Selection" background="#3f6e9c" bold="true"/>
<style name="LineNumber" foreground="#569cf1" background="#121213"/>
<style name="SearchResult" background="#505050"/>
<style name="SearchScope" background="#222200"/>
<style name="Parentheses" foreground="#dcdcdc" background="#0e4583"/>
<style name="ParenthesesMismatch" foreground="#ff5555" background="#3c3c3c"/>
@imaami
imaami / elegant.xml
Created Oct 17, 2019
QtCreator code style
View elegant.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorCodeStyle>
<!-- Written by QtCreator 4.10.1, 2019-10-17T17:31:09. -->
<qtcreator>
<data>
<variable>CodeStyleData</variable>
<valuemap type="QVariantMap">
<value type="bool" key="AlignAssignments">true</value>
<value type="bool" key="AutoSpacesForTabs">false</value>
<value type="bool" key="BindStarToIdentifier">true</value>
You can’t perform that action at this time.