Skip to content

Instantly share code, notes, and snippets.

Avatar

Dan thefekete

View GitHub Profile
View vim-packages.md

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 Jun 12, 2018
Lenovo 120s-11IAP Arch Base Install
View 120s-arch-base.md

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 Jun 12, 2018
Installing Sigrok and Pulseview on Arch Linux
View 2018-06-12_sigrok.md

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 Jan 13, 2018
testing file for automated arch install
View arch-test-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 Apr 26, 2016
Bash script to install extensions from the command line. *Use at your own risk!*
View gnome-ext-install.sh
#!/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 Jan 26, 2016
Bash script template for options parsing
View bash_option_parsing.sh
#!/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 Jan 26, 2016
Bash script to show logging/output functions based on verbosity level
View echo_functions.sh
#!/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 Jan 19, 2016 — forked from ei-grad/trinkup
TRivial INcremental bacKUP script
View trinkup
#!/bin/bash
#
# trinkup - TRivial INcremental bacKUP script
#
# Уж 200 раз твердили Сене:
# Хардлинк спасет от удаленья!
# А кто создать его поможет?
# Crontab и man, тупая рожа!
#
# (c) linux.org.ru, no-dashi
@thefekete
thefekete / gist:1001418
Created May 31, 2011
Abstract Model Class for single field ('name') models
View gist:1001418
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']