Skip to content

Instantly share code, notes, and snippets.

@sarimarton
sarimarton / fix_github_copilot.sh
Last active April 24, 2024 06:59
Fix Github Copilot in dealing with self-signed certificates
# [2023-05-25] Added Copilot Chat, and VSCode Insiders
# [2023-05-20] Add VSCode Insiders variant
# [2023-02-22] Added Copilot Labs
# Fix Github Co-pilot self-signed cert problem
# See: https://github.com/orgs/community/discussions/8866#discussioncomment-3517831
# Note
#
# To make Github Copilot/Nightly/Labs/Chat work, you might need additional
@raphaelm
raphaelm / INSTRUCTIONS.md
Last active November 26, 2019 20:01
letsencrypt.sh ansible role

Step zero: Install this role by creating the directories roles/letsencrypt/, roles/letsencrypt/files/ and roles/letsencrypt/tasks/. Then save the tasks.yml from this gist as roles/letsencrypt/tasks/main.yml and config.sh from this gist as roles/letsencrypt/files/config.sh.

Step one: Add the following to your nginx server config

location /.well-known/acme-challenge {
    root /var/www/letsencrypt;
}

Step two: Execute the ansible role, e.g. using

@dersam
dersam / tmux.mouse.conf
Created October 30, 2015 15:53
tmux 2.1 Mouse Settings
#tmux 2.1 changes how it handles mouse events
#These settings should be all that is necessary to get scrolling and pane selection working again.
#From http://stackoverflow.com/questions/30185210/ubuntu-change-tmux-1-8-to-tmux-next-1-9
#iTerm doesn't require easysimbl
set -g mouse-utf8 on
set -g mouse on
bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -n WheelDownPane select-pane -t= \; send-keys -M
@techouse
techouse / sqlite3mysql.py
Last active May 29, 2023 13:37
A simple Python 3 script to transfer the data from SQLite 3 to MySQL. Requires MySQL Connector/Python 2.0.4 or higher.
#!/usr/bin/env python3
import logging
import sqlite3
import sys
import re
from math import ceil
from os.path import realpath, isfile
import mysql.connector
from mysql.connector import errorcode
@yeokm1
yeokm1 / Read-only FS on Arch Linux ARM.md
Last active August 18, 2023 05:43
Set up Arch Linux ARM on Raspberry Pi to boot from and use a read-only file-system

Read-only FS on Arch Linux ARM

Unlike your typical computer where you usually shutdown properly, I cannot rely on this during the use of my Raspberry Pi. If the Raspberry Pi is improperly shutdown too many times, data corruption in the file system leading to unbootable SD card may result. So we should use a read-only file system.

Full instructions and explanations are obtained from this link but you can run these commands directly. I modified some of the instructions for personal convenience.

Login with default username: alarm, password: alarm

#Optionally enable root over SSH. The rest of these instructions assume u are in root.
@fkleon
fkleon / temperature.sh
Created August 3, 2013 18:27
FreeBSD / FreeNAS script to send a status report containing CPU and HDD temps and status to a given email address. Tested on FreeNAS 9.1.0-RELEASE (based on FreeBSD 9-STABLE). Based on the script available at http://forums.freenas.org/threads/how-to-monitor-system-cpu-hdd-mobo-gpu-temperatures-on-freenas-8.2994/#post-38847.
#! /usr/local/bin/sh
# Write email header to temp file
(
echo "To: your@email"
echo "Subject: System Temperatures INFO"
echo " "
) > /var/cover
# Define adastat function, which writes drive activity to temp file