Skip to content

Instantly share code, notes, and snippets.

View RidaAyed's full-sized avatar

Rida Ayed RidaAyed

View GitHub Profile
@RidaAyed
RidaAyed / test_icsv2ledger.sh
Last active June 25, 2018 13:55
$ git clone https://gist.github.com/RidaAyed/465a90d881b2fd676e1daffe715f9f77 && cd 465a90d881b2fd676e1daffe715f9f77/ && bash test_icsv2ledger.sh
#!/usr/bin/env bash
#######################################################################
# Testing icsv2ledger #
#######################################################################
#######################################################################
# Echo console messages a bit more flashy #
#######################################################################
flashy_echo() {
msg="# $* #"
PLZ ORT Kanton Longitude Latitude
2743 Eschert BE 7.40423 47.263485
1007 Lausanne VD 6.63233 46.519595
2744 Belprahon BE 7.404268 47.288594
2747 Seehof BE 7.517976 47.301549
2745 Grandval BE 7.425376 47.283523
2746 Crémines BE 7.45199388844489 47.2853572618593
2747 Corcelles BE BE 7.517976 47.301549
2762 Roches BE BE 7.37378 47.301706
2832 Rebeuvelier JU 7.417931 47.320793

Change resolution in tty console

I wanted my external screen to work in it's correct resolution while being on the console (without Xorg).

Here's what I've done to get it work:

  1. On boot select Hardware info and look for your desired resolution code e.g. 895
  2. Edit /boot/syslinux/syslinux.cfg
  3. Add vga=895 to the APPEND line in your appropriate block
#!/bin/bash
##########################################
## SCRIPT VERSION 1.0.5 ##
## AUTHOR: MARKUS (www.och-group.de) ##
## Requires apt-get install: ##
## libtiff-tools ##
## tesseract\* ##
## libtiff-dev ##
## pdftk ##
## imagemagick ##
#!/usr/bin/env bash
# No more restore session messages
#######################################################################
# Chrome Shut-Up #
#######################################################################
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences
chromium --no-default-browser-check --no-first-run --disable-infobars --disable-session-crashed-bubble
@RidaAyed
RidaAyed / .vimrc
Last active January 1, 2018 15:51
Append this line to your .vimrc
"Format JSON in vim. Needs python enabled vim version
nmap =j :%!python -m json.tool<CR>