Skip to content

Instantly share code, notes, and snippets.

import XMonad
main = xmonad defaultConfig
{ modMask = mod4Mask -- Use Super instead of Alt
, terminal = "urxvt"
-- more changes
}
@shime
shime / _readme.md
Last active November 8, 2020 08:54 — forked from ryin/tmux_local_install.sh
installation script for tmux 1.9a

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc
@paf31
paf31 / 24days.md
Last active August 8, 2023 05:53
24 Days of PureScript

This blog post series has moved here.

You might also be interested in the 2016 version.

@kleber-swf
kleber-swf / .gitignore
Last active January 20, 2023 00:21
Git ignore for Unity Projects
# =============== #
# Unity generated #
# =============== #
[Tt]emp/
[Oo]bj/
[Bb]uild
/[Ll]ibrary/
/[Ll]ogs/
sysinfo.txt
*.stackdump
@olesenm
olesenm / helium-desktop.sh
Last active April 27, 2022 01:27
helium shell script with normal system locations for 'adb'
#!/bin/sh
# start helium server on android device - see http://www.clockworkmod.com/carbon for more details
# set -x
# try normal system locations before the local binary
unset adb
for i in /usr/bin /usr/local/bin "$(/usr/bin/dirname $0)"
do
i="$i/adb"
if [ -f "$i" -a -x "$i" ]
@yang-wei
yang-wei / decode.md
Last active April 2, 2024 20:18
Elm Json.Decode tutorial and cheatsheet

When receiving JSON data from other resources(server API etc), we need Json.Decode to convert the JSON values into Elm values. This gist let you quickly learn how to do that.

I like to follow working example code so this is how the boilerplate will look like:

import Graphics.Element exposing (Element, show)
import Task exposing (Task, andThen)
import Json.Decode exposing (Decoder, int, string, object3, (:=))

import Http
@jaseemabid
jaseemabid / emacs.org
Created March 3, 2016 20:03
Setup Emacs dev env for Erlang

Setup with Emacs Development environment with EDTS, Flycheck and use-package

This tutorial assumes a reasonably new version of Emacs (24.4+)

EDTS

Erlang Development Tool Suite aims to provide common IDE like functionality.

Use-package

@aportnov
aportnov / router.ex
Last active December 12, 2018 15:45
Elixir: Compiled EEx templates in Plug application
defmodule MyModule.Router do
@moduledoc """
Http Entry Point
"""
use Plug.Router
use Plug.ErrorHandler
plug Plug.Logger
plug :match
@whizzzkid
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active December 3, 2022 15:43
[XPS 15 Early 2017 9560 kabylake] Making Nvidia Drivers + (CUDA 8 / CUDA 9 / CUDA 9.1) + Bumblebee work together on linux ( Ubuntu / KDE Neon / Linux Mint / debian )
# Instructions for 4.14 and cuda 9.1
# If upgrading from 4.13 and cuda 9.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-9.0/
# Important libs required with 4.14.x with Cuda 9.X
$ sudo apt install libelf1 libelf-dev
@dentechy
dentechy / WSL-ssh-server.md
Last active July 14, 2024 03:54
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on: