Skip to content

Instantly share code, notes, and snippets.

View imaami's full-sized avatar
🐺
C/C++/Linux ░▒▓▉▊▋▌▍▎▏

Juuso Alasuutari imaami

🐺
C/C++/Linux ░▒▓▉▊▋▌▍▎▏
  • Finland
View GitHub Profile
@imaami
imaami / altgr_fixed_xmodmaprc.sh
Last active January 15, 2019 17:05
Create xmodmaprc to make VNC usable
#!/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 January 18, 2019 14:19
A Not Completely Disgusting color scheme for Qt Creator
<?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"/>
#!/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 15:16
Steam Proton fixes for Vanguard: Normandy 1944
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 June 9, 2019 18:22
Squad launch script
#!/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 August 24, 2019 19:44
Make the user service manager aware of D-Bus etc.
#!/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 August 31, 2019 06:07
Helper scripts for cherry-picking patches with modifications and a "(ported ...)" message
#!/bin/bash
usage()
{
cat << EOF
usage: git port [<options>] <commit>
or: git port --continue
EOF
exit $((1))
@imaami
imaami / .Xresources
Created September 19, 2019 13:16
Xresources for URxvt
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 October 17, 2019 14:34
QtCreator color scheme for Flat Dark
<?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 October 17, 2019 14:35
QtCreator code style
<?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>