Skip to content

Instantly share code, notes, and snippets.

View jelofsson's full-sized avatar
🏡
Working from home

Jimmi Elofsson jelofsson

🏡
Working from home
View GitHub Profile
@AntonFriberg
AntonFriberg / install-swerty-altgr-working.md
Last active October 17, 2023 15:39
Swerty Keyboard Layout with working Alt-Gr on Linux Debian 10

Background

The Swerty keyboard layout is created by Johan E. Gustafsson and hosted on http://johanegustafsson.net/projects/swerty/

Swerty is released under the MIT Licence.

Since I spend a lot of time getting the right alt-gr key to work I decided to share back my fixes.

Installation

@helderco
helderco / db-open
Created October 6, 2015 14:51
Script to open a mysql database in Sequel Pro from a service in docker-compose.
#!/bin/bash
set -e
show_help() {
cat << EOF
Usage: ${0##*/} [-u USER] [-p PASS] [-P PORT] [-H HOST] [DATABASE]
${0##*/} -h
Open a standard connection in Sequel PRO.
@swarminglogic
swarminglogic / enterpass.sh
Last active May 9, 2016 15:55
Fills out username/password. Triggered by global hotkey. Application agnostic. Determines best user/pass match from process information. Requiers userpass.sh (https://gist.github.com/swarminglogic/40922ce92e49aae3b2ca)
#!/bin/bash
# Use this with a global hotkey to the following: gksudo [FULLPATH]/enterpass.sh
if [[ $EUID -ne 0 ]] ; then
notify-send "This script must be run as root"
exit
fi
if ! command -v userpass > /dev/null ; then
@mjkoo
mjkoo / eui_install.py
Last active August 8, 2020 09:04
Install Civ 5 Enhanced UI Mod on Linux
#!/usr/bin/env python2
# NOTE: Use of this script is deprecated, instead I recommend you use
#
# $ unzip -LL eui_v1_20.zip -d "$HOME/.steam/steam/SteamApps/common/Sid Meier's Civilization V/steamassets/assets/dlc"
#
# to make use of the unzip command's built-in conversion to lowercase filenames
# (thanks reddit user /u/xkero and github user Mfdas)
import os
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})