Skip to content

Instantly share code, notes, and snippets.

View enockseth's full-sized avatar

Enock Seth Nyamador enockseth

View GitHub Profile
@enockseth
enockseth / postgres-cheatsheet.md
Created November 10, 2024 20:17 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@enockseth
enockseth / gist:140aaadb96011bb20e14a9c36c24546d
Created March 26, 2020 02:20 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@enockseth
enockseth / arch-linux-install
Created December 18, 2019 08:39 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@enockseth
enockseth / latex-letter.tex
Created February 28, 2019 12:23 — forked from ashwin/latex-letter.tex
Simple letter template for LaTeX
%-----------------------------------------------------------------------------%
% Letter class
\documentclass[a4paper, 10pt]{letter}
% Name of sender
\name{Joe Fox}
% Signature of sender
\signature{Joe Fox}
@enockseth
enockseth / jekyll-installation.sh
Created March 28, 2017 18:34 — forked from bast/jekyll-installation-arch.sh
Jekyll installation on Arch Linux.
sudo pacman -S ruby
gem update --user-install
gem install jekyll --user-install
gem install jekyll-paginate --user-install
gem install pygments.rb --user-install
echo "export PATH=/home/bast/.gem/ruby/2.3.0/bin:\$PATH" >> ~/.localrc
@enockseth
enockseth / ghost2jekyll.py
Created March 28, 2017 18:08 — forked from andystanton/ghost2jekyll.py
Ghost2Jekyll: Converts ghost 0.4.2 sqlite db posts to jekyll 2.3.0 markdown posts.
#!/usr/bin/env python3
# This script is provided to show how I migrated from Ghost 0.4.2
# to Jekyll 2.3.0 and is used at your own risk. Back up your blog
# before trying it out.
def getPostTemplate():
with open('post-template.md', 'r') as f:
posttemplate = f.read()
f.closed
@enockseth
enockseth / HOTQuickstart.md
Last active August 29, 2015 14:26 — forked from meetar/HOTQuickstart.md
How to get started contributing to a Humanitarian OpenStreetMap task

##How to get started contributing to a Humanitarian OpenStreetMap Team task

###Overview

OpenStreetMap (OSM) is an open-source map of the world that anyone can edit. But like any map, it's incomplete.

The Humanitarian OpenStreetMap Team (HOT) helps organize people to improve the OSM map for crisis areas, mostly so aid workers can find their way around and make decisions about undermapped places. The data in these crisis areas is often very poor, or completely non-existent. Therefore any contribution you make at all will be a vast improvement, and could materially help people who are on the ground right now, looking at this data as you edit it, and deciding where to go and who to help.

There are many HOT tasks active at once. As of August 2014, the highest-priority tasks are Gaza and areas affected by the West African Ebola outbreak.

Install firefox in crunchbang

###first, remove iceweasel

sudo apt-get remove iceweasel

###Open sources.list