Skip to content

Instantly share code, notes, and snippets.

View ThomasTJdev's full-sized avatar

Thomas T. Jarløv ThomasTJdev

View GitHub Profile
@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active May 26, 2024 17:26
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
@tomgp
tomgp / index.html
Last active January 23, 2024 07:04
Screensize vs Browser size
<html>
<head>
<title>Screen Resolution &ne; Browser Window</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="http://www.toffeemilkshake.co.uk/tgp-ui-styles/ui-style.css">
<style type="text/css">
.view{
fill:none;
stroke:#000;
stroke-width:3px;
@bobbyd3
bobbyd3 / archlinux_setup_guide.md
Last active December 6, 2017 11:56
How to setup Archlinux

Arch Linux setup guide

This guide is based on the official Archlinux [Installation Guide][1], [Beginners' Guide][2] and some personal preferences.

Partition layout

HDD fs size mountpoint
/dev/sda1 LUKS MAX -
/dev/sda1 LVM MAX /dev/mapper/lvm
@syafiqfaiz
syafiqfaiz / how-to-copy-aws-rds-to-local.md
Last active June 22, 2024 20:31
How to copy production database on AWS RDS(postgresql) to local development database.
  1. Change your database RDS instance security group to allow your machine to access it.
    • Add your ip to the security group to acces the instance via Postgres.
  2. Make a copy of the database using pg_dump
    • $ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
    • you will be asked for postgressql password.
    • a dump file(.sql) will be created
  3. Restore that dump file to your local database.
    • but you might need to drop the database and create it first
    • $ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
  • the database is restored
@0xjac
0xjac / private_fork.md
Last active July 24, 2024 23:13
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@srmds
srmds / Installing wkhtmltopdf 0.12.6, 0.12.5, 0.12.4 - Ubuntu 22.06 , 18.04, 16.04 x64, 0.12.6 - MacOS Ventura 13.6.md
Last active June 14, 2024 13:47
Installing wkhtmltopdf 0.12.4, 0.12.5 0.12.6 - Ubuntu 22.04 - 0.12.6, 16.04 x64, 0.12.5 - Ubuntu 18.04 x64 - 0.12.5 - macOS Ventura -13.6
@ThomasTJdev
ThomasTJdev / GIT commands.md
Last active January 4, 2024 14:33
GIT commands

Fix last commit message

Made a typo or wrong description in a commit message? Run and edit:

git commit --amend

Add a file to latest commit

git commit --amend --reuse-message HEAD
#or
@AD-Paladins
AD-Paladins / ShareBase64PDF.swift
Last active November 16, 2022 08:24
Store base64 String to file and share it
import UIKit
class ViewController: UIViewController {
@IBAction func sharePDFActionButton(_ sender: Any) {
do {
try savePdf()
loadPDFAndShare()
} catch {
print("FALLO EL GUARDAR EL PDF")
@jdoss
jdoss / devel_services_pod.sh
Created February 22, 2022 23:17
Quickly launch Elasticsearch, Redis, and PostgreSQL inside a Podman pod.
#!/bin/bash
set -e
ELASTICSEARCH_VERSION=7.5.2
ELASTICSEARCH_PORT=9200
REDIS_VERSION=6.0.1
REDIS_PORT=6379