Skip to content

Instantly share code, notes, and snippets.

@airicbear
airicbear / leagueoflinux.md
Last active July 11, 2019 16:33
Install League of Legends on Linux

Installation

sudo apt install snapd
sudo snap install leagueoflegends --edge --devmode
sudo snap refresh --candidate wine-platform-runtime
sudo snap refresh --candidate wine-platform-4-staging

Add to PATH

@airicbear
airicbear / main.hs
Created July 17, 2019 04:12
Print arguments in Haskell
import System.Environment
main = do
args <- getArgs
print args
@airicbear
airicbear / change-default-text-editor.md
Created July 20, 2019 04:28
Change default text editor

Change default text editor

sudo update-alternatives --config editor
@airicbear
airicbear / main.c
Last active July 21, 2019 03:25
Fahrenheit/Celsius table
#include <stdio.h>
#define LOWER 0 /* lower limit of temp. table (in Fahrenheit) */
#define UPPER 300 /* upper limit */
#define STEP 20 /* step size */
double fahrenheitToCelsius(int fahr) {
return (5.0 / 9.0) * (fahr - 32.0);
}
@airicbear
airicbear / GUIDE
Created August 2, 2019 00:29
A newbie's guide to coding
One of the biggest problems with coding and programming with beginners is
how intimidating it can be. This guide explains why coding can appear to be
difficult for those who are unfamiliar with it and how they should approach
learning how to code.
In my experience, I have found that the people who struggle most with
coding are those who are not comfortable with typing. It seems obvious that
this would be the case, but too often do I assume that everyone is good at
typing. So, the first step would be to make sure that you can type on your
keyboard reasonably quickly and be able to identify what each and every key
@airicbear
airicbear / .spacemacs
Last active January 18, 2020 00:51
Spacemacs configuration
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory

Keybase proof

I hereby claim:

  • I am airicbear on github.
  • I am airicbear (https://keybase.io/airicbear) on keybase.
  • I have a public key ASAdCGruWDbkXmyLx7IDzjK4zh5YaLu58HgdqLtyArmn9go

To claim this, I am signing this object:

@airicbear
airicbear / convert.sh
Created August 18, 2019 08:09
Useful scripts I used for my Journal
#!/usr/bin/env bash
# Convert markdown files to PDF format.
# Dependencies:
# - pandoc (apt): sudo apt install pandoc
# - xetex (apt): sudo apt install texlive-xetex
for FILE in ./md/*.md; do
@airicbear
airicbear / domu
Last active September 25, 2019 13:56
sudo nvim /usr/local/bin/domu; sudo chmod +x /usr/local/bin/domu
youtube-dl --extract-audio --audio-format vorbis -o "%(title)s.%(ext)s" $@
@airicbear
airicbear / install_flash.md
Created September 26, 2019 16:21
Install Adobe Flash Plugin for Firefox on Ubuntu 18.04

Instructions courtesy of ubuntu18.com

Install Flash

sudo apt-add-repository "deb http://archive.canonical.com/ubuntu bionic partner"
sudo apt update
sudo apt install adobe-flashplugin