Skip to content

Instantly share code, notes, and snippets.

View gossterrible's full-sized avatar
😀
Imagine Sisyphus writing software and happy

Boni gossterrible

😀
Imagine Sisyphus writing software and happy
  • Montreal, Canada
View GitHub Profile
@gossterrible
gossterrible / file.pb.js
Last active December 5, 2024 23:58
Pocketbase file metadata hook
/// <reference path="../types.d.ts" />
// Fires before the record is created
onRecordCreateRequest((e) => {
try {
const record = e.record;
if (!record) return e.next();
// Find all meta fields and their corresponding file fields
const fields = Object.keys(record.fieldsData());
@gossterrible
gossterrible / myslabs.md
Last active January 27, 2024 20:00
Myslabs.md
  • How will auction interact with seller set to vacation mode? #
;F
HZDOTht DB 000H,000H
@gossterrible
gossterrible / swap.txt
Created September 4, 2018 05:16
create swap ubuntu
Enabling the Swap File
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
Check swap
free -h
@gossterrible
gossterrible / README.md
Created July 26, 2018 10:24 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
function wp_noshor_redefine_locale($locale) {
if( is_admin() ):
switch_to_locale('en_US');
endif;
}
add_filter('init','wp_noshor_redefine_locale');
@gossterrible
gossterrible / wechat_debug
Created March 17, 2018 01:47
Sample code for Wechat browser play() and pause() errors
When I was doing my project recently, I found an error on the console.
Error screenshot
A look at the right of the error file is undefined
This is an annoyance, and the problem is not located.
Solve this problem today and share it.
sudo apt-get update
sudo apt-get upgrade
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.1 php7.1-mcrypt php7.1-xml php7.1-gd php7.1-opcache php7.1-mbstring
sudo apt-get install apache2 libapache2-mod-php7.1
cd /tmp
@gossterrible
gossterrible / file
Created July 6, 2017 07:32
freedom_public
{"0.04373345321901989":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMEaZzNvy0n7EvSN3sG3jw3jNw7GYct5Hja\r\nDmZvip6P14CC1MNCiJwgXhtcxRlx9vqvGew7xhijRPXRNiZ1uSNHSc3/AAAACDxn\r\naXRodWI+wv8AAACOBBATCABA/wAAAAWCWV3nU/8AAAACiwn/AAAACZCRvYtvNy7a\r\n1f8AAAAFlQgJCgv/AAAABJYDAQL/AAAAApsD/wAAAAKeAQAAjawA+wfuedx8YCxw\r\nMiTLNJASGNlYzWlXvQ143+xYgYjXL2h1AP4t/nPrDmH5sVn6jpHVJQPuE9WuUfvE\r\nJJRClbDTSpiFss7/AAAAVgQAAAAAEggqhkjOPQMBBwIDBB7s0h0xk8kwz4PBV1bF\r\nJWvaPh/QnS6ek5Meb7D/T3sm9g+dbO7D68QhwkMJOzdzSloc7dGkSFMvP9XlS7g6\r\nyOcDAQgHwv8AAABtBBgTCAAf/wAAAAWCWV3nU/8AAAAJkJG9i283LtrV/wAAAAKb\r\nDAAALHoA/3JXok9Kfn6GggGWaF82mQWwBnZuojPCB4AydKZ1cSI1AQCkJxN/Lh/u\r\nT6LAGoZpjNUhQ/l8nRxoSyGplQ4p7tEGjg==\r\n=urZ2\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n"}
@gossterrible
gossterrible / README.md
Created January 20, 2017 02:36 — forked from AyushSachdev/README.md
A shell script to install VPN using SoftEther and Transmission CLI Torrent Client on Ubuntu 14.04 for use on Digital Ocean

Readme

A shell script to install VPN using SoftEther and Transmission CLI Torrent Client on Ubuntu 14.04 for use on Digital Ocean

Execution

  • Execution for installation and setup
sudo su