Skip to content

Instantly share code, notes, and snippets.

View hpanago's full-sized avatar

Iliana Panagopoulou hpanago

View GitHub Profile
@hpanago
hpanago / .vimrc
Created November 7, 2017 20:15
confs
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make
set hidden " Hide buffers when they are abandoned
set mouse=a " Enable mouse usage (all modes)
syntax on
set nocompatible
@hpanago
hpanago / memory.sh
Last active December 12, 2015 20:58
Bash script that notifies you when you free memory is 100 MB. Shows process ID and name.
#!/bin/bash
MEM=`cat /proc/meminfo | egrep 'MemFree:' |tr -d '[[:space:]]' | sed '$s/..$//' | cut -d ":" -f2`
USER=`whoami`
PID=`ps -ly --User $USER --sort -rss | sed -n '2p' | tr -s [[:blank:]] | cut -d " " -f3`
NAME=`ps -ly --User $USER --sort -rss | sed -n '2p' | tr -s [[:blank:]] | cut -d " " -f13`
if [ $MEM -lt 102400 ]; then
DISPLAY=:0 notify-send "Low memory. #1 process in RAM usage: $NAME with PID: $PID"
@hpanago
hpanago / index.html
Created October 28, 2015 21:02
hpanago.com main page
<!DOCTYPE html>
<html>
<head>
<link rel="icon" type="image/png" href="favicon.png">