Skip to content

Instantly share code, notes, and snippets.

(use-package lsp-haskell
:config
(setq lsp-haskell-process-path-hie "haskell-language-server-wrapper")
;; xref backends don't compose. This creates one that first consults the
;; xref-lsp backend for the latest information from the language server,
;; and then falls through to etags for library definitions.
(defun my/xref-lsp-etags-backend () 'my/lsp-etags)
(cl-defmethod xref-backend-identifier-at-point ((_backend (eql my/lsp-etags)))
(xref-backend-identifier-at-point 'xref-lsp))
@ssledz
ssledz / spacemacs-keybindings.md
Created January 26, 2022 12:54 — forked from rnwolf/spacemacs-keybindings.md
spacemacs keybindings that i need to learn
@ssledz
ssledz / Setup GCC and CLANG Toolchains.md
Created June 13, 2020 08:35 — forked from bhaskarvk/Setup GCC and CLANG Toolchains.md
Proper GCC (vers. 5/6/7) & LLVM/CLANG (vers. 4/5) Toolchain Setup on Ubuntu/Linux Mint

This approach uses update-alternatives to manage GCC and LLVM/CLANG C/C++ compiler toolchains. Although tested on Linux Mint 18.3, this approach should work on any Debian based distro or for that matter any Linux distro with update-alternatives support, provided the packages are installed correctly.

There are 3 files

  • gcc-alternatives.sh installs GCC versions 5/6/7 and sets up alternatives for gcc/g++/cpp/gfortran.
  • llvm-clang-alternatives.sh installs LLVM and CLANG versions 4/5 and sets up alternatives for various LLVM and CLANG programs including clang and clang++.
  • cc-alternatives.sh sets up alternatives for the cc, cxx, and the ld commands. This script can be used to change systemwide default compiler/linker combination to either GCC or CLANG.

Once these scripts are run you can change the system GCC/CLANG versions by running sudo update-alternatives --config gcc|clang. To change the default compiler/linker combo used by t

@ssledz
ssledz / intellj-update.sh
Created August 26, 2019 14:59
Update Intellj Idea from .tar.gz, using symlink
#!/bin/bash
IDEA=`tar -tzf $1 | head -1 | cut -f1 -d"/"`
sudo tar -xf $1 -C /opt/
sudo chown $(whoami):$(whoami) /opt/$IDEA -R
sudo rm /opt/idea-IU
sudo ln -s /opt/$IDEA /opt/idea-IU
sudo chown $(whoami):$(whoami) /opt/idea-IU
@ssledz
ssledz / clean-up-boot-partition-ubuntu.md
Created January 16, 2018 10:39 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@ssledz
ssledz / pom.xml
Created January 29, 2017 02:19 — forked from nwinkler/pom.xml
Combining the git-flow branching model and the Maven Release Plugin to play nice. Based on info found here: http://vincent.demeester.fr/2012/07/maven-release-gitflow/
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>group</groupId>
<artifactId>dummy</artifactId>
<name>Dummy Project</name>
<version>1.0.12</version>
<packaging>pom</packaging>
<scm>
<connection>scm:git:https://......</connection>
<tag>HEAD</tag>
@ssledz
ssledz / maven-archetype.list
Created January 26, 2017 14:47 — forked from zbigniewTomczak/maven-archetype.list
Maven archetypes list (mvn archetype:generate)
Choose archetype:
1: remote -> br.gov.frameworkdemoiselle.archetypes:demoiselle-jsf-jpa (Archetype for web applications (JSF + JPA) using Demoiselle Framework)
2: remote -> br.gov.frameworkdemoiselle.archetypes:demoiselle-minimal (Basic archetype for generic applications using Demoiselle Framework)
3: remote -> co.ntier:spring-mvc-archetype (An extremely simple Spring MVC archetype, configured with NO XML.)
4: remote -> com.agilejava.docbkx:docbkx-quickstart-archetype (-)
5: remote -> com.alibaba.citrus.sample:archetype-webx-quickstart (-)
6: remote -> com.bsb.common.vaadin:com.bsb.common.vaadin.embed-simple-archetype (-)
7: remote -> com.bsb.common.vaadin:com.bsb.common.vaadin7.embed-simple-archetype (-)
8: remote -> com.cedarsoft.open.archetype:multi (-)
9: remote -> com.cedarsoft.open.archetype:simple (-)
@ssledz
ssledz / enable_mongo.sh
Created June 16, 2016 23:24 — forked from sgnn7/enable_mongo.sh
Mongodb 3.2 on Ubuntu 15.10
echo '[Unit]
Description=High-performance, schema-free document-oriented database
After=syslog.target network.target
[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod -f /etc/mongod.conf
[Install]
@ssledz
ssledz / bash-cheat-sheet
Created May 21, 2016 14:36
BASH Cheat Sheet
B A S H C H E A T S H E E T
to page output forward (only): command filename | more
to page output forward & back: command filename | less
to print a dataset: lp datasetname (-d printerid) (-o landscape)
USE OF QUOTATION MARKS
echo "$varname" = echo The value of \$varname is \"$varname\"
= echo "The value of \$varname is \"$varname\"."
$fred='Four spaces between these words.'