Skip to content

Instantly share code, notes, and snippets.

View tribela's full-sized avatar
😺
😼

Jeong Arm tribela

😺
😼
View GitHub Profile
@superjamie
superjamie / install-ubuntu-luks-lvm.md
Last active April 29, 2024 19:08
How to install Ubuntu with LUKS Encryption on LVM

How to install Ubuntu with LUKS Encryption on LVM

My work requires us to have full-disk encryption, so these are the steps I use.

The basic idea is to create a LUKS-encrypted partition which is used as an LVM Physical Volume.

The GRUB boot partition isn't encrypted, but everything else is.

These steps tested and working on 22.04 (jammy) and 20.04 (focal).

@channprj
channprj / notion-worker.js
Last active November 28, 2021 18:33
Publish Notion homepage using https://fruitionsite.com
/* CONFIGURATION STARTS HERE */
/* Step 1: enter your domain name like fruitionsite.com */
const MY_DOMAIN = 'chann.dev';
/*
* Step 2: enter your URL slug to page ID mapping
* The key on the left is the slug (without the slash)
* The value on the right is the Notion page ID
*/
@kytulendu
kytulendu / install-opencl-amd.sh
Last active April 24, 2024 17:34
A shell script to install AMDGPU-PRO OpenCL driver.
#!/bin/bash
# This script will install AMDGPU-PRO OpenCL and Vulkan support.
#
# For Ubuntu and it's flavor, just install the package using this command
# in extracted driver directory instread.
#
# ./amdgpu-pro-install --opencl=legacy,pal --headless --no-dkms
#
# For Arch Linux or Manjaro, use the opencl-amd or rocm-opencl-runtime on AUR instread.
@tateisu
tateisu / deletePosts.md
Last active February 24, 2019 05:40
Removing local copies of unreferenced external posts

Removing local copies of unreferenced external posts

日本語 => https://gist.github.com/tateisu/3d98290f2b72d12ba5f1b977a0d5743c

Summary

SQL exapmle that deletes local copies of external posts flowing from the FTL or relays and that are not referenced long time by local users.

Note: It is "reduction" of data increase , not "to be able to operate infinitely with a fixed disk capacity".

anonymous
anonymous / index.html
Created November 9, 2016 17:44
Capture FB Reactions count and show them on webpage
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My FB Reactions Page</title>
<style>
html {
box-sizing: border-box;
width: 100%;
@johanndt
johanndt / upgrade-postgres-9.3-to-9.5.md
Last active July 15, 2022 12:35 — forked from dideler/upgrade-postgres-9.3-to-9.4.md
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu

TL;DR

Install Postgres 9.5, and then:

sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
@tribela
tribela / 404
Last active March 7, 2019 08:20
Captive portal CGI
#!/bin/sh
cat << EOF
Status: 302 Temporary Redirect
Location: /cgi-bin/auth
Cache-Control: no-cache
<!doctype html>
<html>
<head>

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@ssut
ssut / line.thrift
Created February 22, 2014 08:24
Naver LINE protocol interface file, functions as used by the desktop client.
// Naver LINE protocol interface file, functions as used by the desktop client.
namespace cpp line
// :%s/.*"\([^"]*\)", \d\+, \(\d\+\).*/\1 = \2;/
enum TalkExceptionCode {
ILLEGAL_ARGUMENT = 0;
AUTHENTICATION_FAILED = 1;
DB_FAILED = 2;