Skip to content

Instantly share code, notes, and snippets.

View Arkshine's full-sized avatar
🎯
Focusing

Arkshine Arkshine

🎯
Focusing
  • France
  • 06:22 (UTC +02:00)
View GitHub Profile

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
=================================================================================
ENV Summary:
TIME: Tue Jan 28 2025 14:38:10 GMT+0100 (Central European Standard Time)
TITLE: ember
ARGV:
- /home/arkshine/.nvm/versions/node/v18.20.2/bin/node
- /home/arkshine/discourse/app/assets/javascripts/discourse/node_modules/ember-cli/bin/ember
- server
@Arkshine
Arkshine / README.md
Created November 6, 2023 23:38 — forked from bnhf/README.md
WSL 2 - Enabling systemd in Debian 11

Enable systemd in WSL2 Debian 11

This guide will help you install systemd to run as normal under WSL2 Debian. This will allow services like microk8s, docker, cockpit and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 21H2, running Debian 11 in WSL2.

  • To enable systemd under WSL we require a tool called systemd-genie

  • Download install-sg.sh to a temporary location /tmp:

cd /tmp
@Arkshine
Arkshine / wp-config-debug.php
Created January 7, 2023 02:05 — forked from jrfnl/wp-config-debug.php
Code to add to wp-config.php to enhance information available for debugging.
<?php
/**
* == About this Gist ==
*
* Code to add to wp-config.php to enhance information available for debugging.
*
* You would typically add this code below the database, language and salt settings
*
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists).
*
@Arkshine
Arkshine / Install update WordPress puglins directly.md
Created May 19, 2022 19:48 — forked from dianjuar/Install update WordPress puglins directly.md
Install update WordPress plugins without providing ftp access

Install WordPress plugins directly (without FTP)

Put this on your wp-config.php

/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
const functions = require('firebase-functions')
const admin = require('firebase-admin')
const express = require('express')
const app = express()
const auth = admin.auth()
const cors = require('cors')
const cookieParser = require('cookie-parser')
const DiscourseSSO = require('discourse-sso')
const env = functions.config()
const __DEBUG__ = false
@Arkshine
Arkshine / README-WordPress-FULLTEXT-Search.md
Created August 19, 2021 16:08 — forked from jesgs/README-WordPress-FULLTEXT-Search.md
WordPress Full Text Search Examples

Adding MySQL FULLTEXT Support to WordPress

FULLTEXT support to WordPress is simple if you have access to phpMyAdmin. If not, it can still be done but is a little trickier if you’re not used to command-line. We’ll demonstrate how to modify your WordPress database using phpMyAdmin.

How To Modify Database

  1. Start out by having a set of keywords to test against. You’ll need ‘before’ and ‘after’ test results. Also, I can’t stress this enough but back up your database before proceeding!

  2. Next, log into your phpMyAdmin page and navigate to your {prefix}_posts table.

  3. Click on the “Structure” tab.

@Arkshine
Arkshine / gist:d93daa0092652f7ce7fa7e6caa426737
Created November 12, 2020 16:52 — forked from Mecanik/gist:d2314fbc860b9c68eac4b101127b738e
Install and configure PHP 7.3 ev/event PECL extension on Ubuntu Linux 18.04.3
# For phpize
apt install php7.3-dev
# Install extensions
pecl install ev
pecl install event
# Create configurations
sudo echo 'extension=ev.so' > /etc/php/7.3/mods-available/ev.ini
sudo echo 'extension=event.so' > /etc/php/7.3/mods-available/event.ini
@Arkshine
Arkshine / wp-xmlrpc-jail.local
Created September 9, 2020 21:19
Fail2Ban WordPress XMLRPC Jail and Filter. Notes: log path is set for Plesk v12.x. Change this to appropriate path for your set up. Only works if WordPress is installed in webroot, edit the Filter failregex if installed in sub-directory.
[wp-xmlrpc]
enabled = true
filter = wp-xmlrpc
action = iptables-multiport[name=wp-xmlrpc, port="http,https"]
logpath = /var/www/vhosts/system/*/logs/*access*log
/var/log/httpd/*access_log
bantime = 86400
maxretry = 0
@Arkshine
Arkshine / borg
Last active September 11, 2017 22:47 — forked from xals/borg
BorgBackup handler script for backupninja
# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
# vim: set filetype=sh sw=3 sts=3 expandtab autoindent:
#
# borg handler script for backupninja
# requires borgbackup
#
# Guillaume Subiron, Sysnove, 2016
#
# Copyright 2016 Guillaume Subiron <guillaume@sysnove.fr>
# This work is free. You can redistribute it and/or modify it under the