Skip to content

Instantly share code, notes, and snippets.

View thefekete's full-sized avatar

Dan thefekete

View GitHub Profile
@thefekete
thefekete / vim-packages.md
Created June 13, 2018 14:01
Vim Packages

If you haven't done so already, run :help packages in vim and read the whole section to get an understanding of how the package system works in vim.

George Ornbo also has a very good write up that explains it well.

Preparation

First we need to create the directories that we will install the plugins too:

mkdir -vp $XDG_CONFIG_HOME/vim/pack/$USER/{start,opt}
@thefekete
thefekete / 120s-arch-base.md
Last active June 12, 2018 12:05
Lenovo 120s-11IAP Arch Base Install

Installation Media

Download arch installation iso then write to USB flash drive:

dd bs=4M if=~/Downloads/archlinux.iso of=/dev/sdX status=progress && sync

Booting the Installer

@thefekete
thefekete / 2018-06-12_sigrok.md
Last active June 12, 2018 12:00
Installing Sigrok and Pulseview on Arch Linux

Package installation

For DSLogic Plus

For some reason, as of this writing, the standard sigrok package doesn't yet recognize the DreamSourceLab DSLogic Plus. Therefore the git versions need to be installed as follows:

aurman -S --noconfirm --noedit pulseview-git sigrok-cli-git sigrok-firmware-fx2lafw-bin sigrok-firmware-dreamsourcelab-dslogic
@thefekete
thefekete / arch-test-install
Last active January 13, 2018 21:14
testing file for automated arch install
#!/bin/bash
# vim: fdm=marker
# the most unsecure way to use this:
# curl -sL -H 'Cache-Control: no-cache' https://git.io/vbh2O
set -e
if [ ! $(hostname) == "archiso" ]; then
>&2 echo "Not in the Arch install environment, exiting for safety"
exit 1
fi
@thefekete
thefekete / gnome-ext-install.sh
Created April 26, 2016 16:52
Bash script to install extensions from the command line. *Use at your own risk!*
#!/bin/bash
set -e
set -u
version="0.0"
usage="$(basename $0) version $version
usage:
$(basename $0) install <extension-uuid> [<extension-id/uuid> ... ]
@thefekete
thefekete / bash_option_parsing.sh
Created January 26, 2016 08:43
Bash script template for options parsing
#!/bin/bash
# see http://stackoverflow.com/a/14203146 for more on this
set -e
set -u
###################
# Option Defailts #
###################
opt="option default"
flag=false
@thefekete
thefekete / echo_functions.sh
Created January 26, 2016 08:42
Bash script to show logging/output functions based on verbosity level
#!/bin/bash
# see http://stackoverflow.com/a/14203146 for more on this
set -e
verbose=0
# log functions
error() { >&2 echo $*; } # prints to stderr always
warn() { (($verbose>0)) && echo $* || true; } # prints when verb is >0
info() { (($verbose>1)) && echo $* || true; } # prints when verb is >1
@thefekete
thefekete / trinkup
Last active January 19, 2016 16:25 — forked from ei-grad/trinkup
TRivial INcremental bacKUP script
#!/bin/bash
#
# trinkup - TRivial INcremental bacKUP script
#
# Уж 200 раз твердили Сене:
# Хардлинк спасет от удаленья!
# А кто создать его поможет?
# Crontab и man, тупая рожа!
#
# (c) linux.org.ru, no-dashi
@thefekete
thefekete / gist:1001418
Created May 31, 2011 22:27
Abstract Model Class for single field ('name') models
class NameModel(models.Model):
"""
Abstract Model Class for single field ('name') models
"""
name = models.CharField(max_length=64, unique=True)
class Meta:
abstract = True
ordering = ['name']