Skip to content

Instantly share code, notes, and snippets.

View bigos's full-sized avatar

Jacek Podkanski bigos

  • North West England
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chriscandy
chriscandy / install-arch-linux-using-efi-and-grub.md
Last active June 28, 2024 08:45
Install Arch Linux using EFI and GRUB

Installing Arch linux with EFI

  1. Change keyboard layout:

    • loadkeys no
  2. Verify boot mode:

    • ls /sys/firmware/efi/efivars (If the directory exist your computer supports EFI)
  3. Ping some site on the Internet to verify connection:

  • ping archlinux.org
@bigos
bigos / simplified-haskell-install.org
Last active November 29, 2022 03:34
My way of installing Haskell on Windows so that I can build gi-gtk based stack projects

Simplified installation

already I have

choco msys2 emacs

Install GHC

open cmd as administrator

Press Windows button, in ‘Type to search’ type cmd, right-click on Command Promp Desktop app and select Run as administrator.

lines to paste in cmd

@DmitrySoshnikov
DmitrySoshnikov / Recursive-descent-backtracking.js
Last active January 3, 2024 17:15
Recursive descent parser with simple backtracking
/**
* = Recursive descent parser =
*
* MIT Style License
* By Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
*
* In this short lecture we'll cover the basic (non-predictive, backtracking)
* recursive descent parsing algorithm.
*
* Recursive descent is an LL parser: scan from left to right, doing
@favadi
favadi / build-emacs.sh
Last active June 5, 2021 15:25
Compile latest emacs version (24.5) in Ubuntu 14.04
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Ubuntu 14.04 LTS
# version: 24.5
# Toolkit: lucid
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs
set -e
@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active May 19, 2024 19:25
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

Books

Algorithms and Data Structures

The Art of Computer Programming (Knuth)

Programming Pearls (Bentley)

Data Structures and Algorithms (Aho, Hopcroft, Ullman)

@geoffgarside
geoffgarside / rails4-template.rb
Last active June 26, 2022 21:27
Rails 4 Application Template
# Rails 4 Application Template
# Remove normal files we don't want
remove_file "README.rdoc"
remove_file "public/index.html"
remove_file "app/assets/images/rails.png"
# Copy database.yml and secrets.yml to sample
inside "config" do
run "cp database.yml database.yml.sample"
run "cp secrets.yml secrets.yml.sample"

Ubuntu 12.04, Ruby, Rails, Nginx, Unicorn and git-deploy

In the seemlingly endless search for the actual correct and easy way to deploy a Rails app, we have tried several ways. We tried out using Apache2 and running a cluster of Thin servers. With the built in threading of Puma we decided to use it with Nginx.

Server Setup

  • Create new server
  • Login to new server
    • ssh username@IPaddress (you can also use the domain name if you have the DNS setup already)
    • accept the RSA key