Skip to content

Instantly share code, notes, and snippets.

View ericrswanny's full-sized avatar
💭
:)

Eric Swanson ericrswanny

💭
:)
View GitHub Profile
@ericrswanny
ericrswanny / SUSPEND_pmouse.sh
Last active August 6, 2020 10:21
X240 Touchpad Suspend Fix
#!/bin/sh
# /lib/systemd/system-sleep/SUSPEND_pmouse.sh
# Note: don't forget to make it executable
case $1/$2 in
pre/*)
echo "Going to $2..."
# Place your pre suspend commands here, or `exit 0` if no pre suspend action required
modprobe -r psmouse
;;
post/*)
#!/usr/bin/env python
"""Basic Python Cheat Sheet by Filip Kral on 2015/02/16"""
"""
Python is a cross-platform, interpreted, object-oriented programming language.
That means you can run it on Linux, Windows, Mac, and other platforms,
you don't need to compile your code to execute it because it is compiled on
the fly, and you can use classes and objects.
@ericrswanny
ericrswanny / monswitch
Created January 1, 2013 20:58
Bash script used for switching monitor between VGA and LVDS in Arch Linux.
#!/bin/bash
# Script for dual monitors
LVDS="LVDS1"
VGA="VGA1"
CHK_VGA=$(xrandr | grep $VGA | awk ' { print $2 } ')
CHK_VGA_G=$(xrandr | grep $VGA | grep "+")
function dual_it_up()
@ericrswanny
ericrswanny / BubbleSort.java
Created September 10, 2011 20:24
BubbleSort algorithm implemented in java
/*============================================================================
Name : BubbleSort.java
Author : Eric Swanson
Date : Sep 10, 2011
Version :
Description :
RequiredFile: LinkedList.java
Copyright (C) 2011 Eric Swanson
@ericrswanny
ericrswanny / LinkedList.java
Created September 10, 2011 14:01
A linked list class implemented in Java
/*============================================================================
Name : LinkedList.java
Author : Eric Swanson
Date : Sep 7, 2011
Version :
Description :
Copyright (C) 2011 Eric Swanson
This program is free software: you can redistribute it and/or modify