Skip to content

Instantly share code, notes, and snippets.

@andrwj
andrwj / .tigrc
Created November 2, 2023 06:51 — forked from eu81273/.tigrc
Tig 모든 기본 설정 + 커스텀
# Tig 기본 설정
# 'man tigrc' 를 커맨드라인에서 입력하면 전체 매뉴얼을 볼 수 있다.
# 매뉴얼 한글 번역 http://ujuc.github.io/2016/02/10/tig-manual/
# 설정
# --------
# 여기에 있는 대부분의 설정들은 toggle-* 이나 옵션 메뉴(기본값은 'o' 키)를 통해 토글할 수 있다.
# 뷰 설정
#
Home/Core TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Home/Core (Country Specific) PVMJN-6DFY6-9CCP6-7BKTT-D3WVR
Home/Core (Single Language) 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
Home/Core N 3KHY7-WNT83-DGQKR-F7HPR-844BM
Professional W269N-WFGWX-YVC9B-4J6C9-T83GX
Professional N MH37W-N47XK-V7XM9-C7227-GCQG9
Professional Enterprise
Professional Workstation
Enterprise NPPR9-FWDCX-D2C8J-H872K-2YT43
Enterprise N DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4
@andrwj
andrwj / DrawSineWave.html
Created September 24, 2023 15:24 — forked from gkhays/DrawSineWave.html
Oscillating sine wave, including the steps to figuring out how to plot a sine wave
<!DOCTYPE html>
<html>
<head>
<title>Sine Wave</title>
<script type="text/javascript">
function showAxes(ctx,axes) {
var width = ctx.canvas.width;
var height = ctx.canvas.height;
var xMin = 0;
@andrwj
andrwj / actionlist.vim
Created May 18, 2023 00:33 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@andrwj
andrwj / chat.py
Created May 12, 2023 04:53 — forked from vivekhaldar/chat.py
Simple Python script to invoke ChatGPT API.
#!/usr/bin/env python3
#
# Takes a chat transcript (for ChatGPT) on stdin, calls the OpenAI
# ChatGPT API, and prints the response on stdout.
#
# Your OpenAI API key must be set in the environment variable
# OPENAI_API_KEY.
#
# Logs are written to ~/chat.log.
@andrwj
andrwj / phabricator_readme.md
Created November 16, 2022 10:51 — forked from sparrc/phabricator_readme.md
Phabricator Ubuntu Installation Guide

Phabricator Ubuntu Installation Guide

This is a supplement to the official Phabricator Installation Guide, because their guide will leave you with all kinds of permission and config errors and ~15,000 setup issues on startup.

Install bonus packages:

# apt-get install mercurial subversion python-pygments sendmail imagemagick

Create necessary users and add phd-user to sudoers:

@andrwj
andrwj / gist:c575f728f8dca8af7aad315744db47d4
Created September 19, 2022 16:12 — forked from cuu/gist:92bfa28a9b6de421834e5f9f408a12a4
lineage os 19.1 kernel .config for rpi4 cm4
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 5.10.112 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="real-aarch64-linux-android-gcc (GCC) 4.9.x 20150123 (prerelease)"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=40900
CONFIG_LD_VERSION=227000000
CONFIG_CLANG_VERSION=0
CONFIG_LLD_VERSION=0
@andrwj
andrwj / Raspberry Pi 4 Arm64 Kernel Cross-Compile.md
Created September 17, 2021 13:31 — forked from G-UK/Raspberry Pi 4 Arm64 Kernel Cross-Compile.md
Building the Raspberry Pi 4 Arm64 Linux Kernel

The Raspberry Pi foundation have now released a beta version of an official 64-bit Kernel which can be installed using the rpi-update script. The rpi-update script can be found at https://github.com/Hexxeh/rpi-update/blob/master/rpi-update or through the Raspbian repositories

Introduction

The objective of these instructions is to build a stock 64bit Linux Kernel for use on the Raspberry Pi 4B on a Debian x64 machine (Windows Subsystem for Linux in my case), and deploy on the Raspberry Pi.

Notes:

  • Transfer to Pi is using my NAS in this example, replace with shared drive/memory stick etc. as required.
    • (N: drive on Windows and /mnt/NAS on Linux in this example).
  • For a specific Kernel version replace the 4.19 with the wanted version in the git clone command.
  • Greater than 3GB RAM only currently available on Kernel 4.19
@andrwj
andrwj / README.md
Created June 29, 2021 04:18 — forked from zeevro/README.md
Pebble SDK installation script

Now that Pebble servers are gone, some old components in the SDK need to be patched or replaced so they can fetch what they need from Rebble.

This script downloads and installes everything needed to build projects and also run the emulator.

Was tested on Ubuntu 18.04.2 on WSL.

@andrwj
andrwj / emacs-pkg-install.sh
Created June 11, 2021 18:49 — forked from padawanphysicist/emacs-pkg-install.sh
Install emacs packages from the command-line
#!/bin/bash
#
# I wrapped the code constructed in
#
# http://hacks-galore.org/aleix/blog/archives/2013/01/08/install-emacs-packages-from-command-line
#
# in a single bash script, so I would a single code snippet.
#
# Package to be installed