Skip to content

Instantly share code, notes, and snippets.

View wcomnisky's full-sized avatar
💻

William Comnisky wcomnisky

💻
View GitHub Profile
@wcomnisky
wcomnisky / .bashrc
Created February 18, 2016 22:57
Default .bashrc (untouched)
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@wcomnisky
wcomnisky / gist:840423f526ccbe586db9662d8b905b21
Created November 25, 2016 01:20
Reset the fucking shit
dconf reset -f /org/gnome/
@wcomnisky
wcomnisky / findPostReceive.sh
Last active January 12, 2017 23:27
Find all the post-receive hook files sorted by last modification time
#!/bin/bash
find ./ -type f -iname post-receive -printf '%TY%Tm%Td %h/%f\n'|sort -n
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f121516ed20, pid=269, tid=0x00007f11d6eee700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_111-b14) (build 1.8.0_111-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.111-b14 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [ld-linux-x86-64.so.2+0x9d20]
#
@wcomnisky
wcomnisky / expect-x11vnc.sh
Last active January 31, 2017 01:36
Expect script to SSH-access a machine, login to another user, run x11vnc and close the session after close the VNC client
#!/usr/bin/expect --
# Argument:
# argv0 = host
#
# Usage:
# expect.sh ip-or-hostname
spawn ssh -o StrictHostKeyChecking=no -p 22 -L 9000:localhost:5900 user@[lindex $argv 0]
@wcomnisky
wcomnisky / Force removal broken packages on Ubuntu
Created December 18, 2017 04:11
Force removal broken packages on Ubuntu
sudo dpkg --remove --force-remove-reinstreq pckgName
@wcomnisky
wcomnisky / Fix for Eclipse without the toolbar
Last active December 18, 2017 04:12
Fix for Eclipse without the toolbar
Add the following to eclipse.ini after the --launcher.library and its value:
--launcher.GTK_version
2
@wcomnisky
wcomnisky / Eclipse crash
Last active December 18, 2017 04:12
Eclipse crashing due to libgtk-3.so.0
export SWT_GTK3=0
./eclipse
@wcomnisky
wcomnisky / README.md
Created March 7, 2018 22:58
USB Stick read-only problem on Linux

Use one of the following to find the USB stick:

  • mount
  • df -Th

Umount it:

  • umount /dev/sd{xn}

Format it:

  • sudo mkfs.vfat /dev/sd{xn}
@wcomnisky
wcomnisky / clean-meld-settings.sh
Created March 15, 2020 11:16
Meld not opening when using it as git difftool on Mac OS
#!/bin/bash
# Credit: https://github.com/yousseb/meld/issues/70#issuecomment-425686670
cd ${HOME}
rm -rf ./.local/share/meld
rm -f ./Library/Preferences/org.gnome.meld.plist
rm -rf "./Library/Saved Application State/org.gnome.meld.savedState/"