Skip to content

Instantly share code, notes, and snippets.

@0xdeadbad
0xdeadbad / 00-unity-sandbox-error-ubuntu24.04.md
Last active December 18, 2024 13:27
How to fix "No usable sandbox! Update your kernel... If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox." Unity error on Ubuntu 24.04

New apparmor strict policies

The recent LTS release of Ubuntu introduced some more strict apparmor policies that are affecting many packages. To fix it is quite simple, add a file so apparmor don't deny Unityhub actions.

You can do it by yourself or use the script utility I wrote. For the script checkout Using the script

Commands to fix it manually

If you installed using the .deb distribution, your Unity Hub binary file is probably at /opt/unityhub/unityhub-bin, so you can just copy-paste the snippet to /etc/apparmor.d/unityhub

@asiraky
asiraky / gist:4ea5136e54c8df2de3fb6689f0a5ce18
Created March 24, 2021 07:21
Ubuntu 20.04 SQL Server ODBC Drivers for PHP 7.2
#run through the steps detailed here to install the odbc drivers for Ubuntu 20
https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15#ubuntu17
#then force pecl to use 7.2
sudo pecl -d php_suffix=7.2 install sqlsrv-5.3.0
sudo pecl -d php_suffix=7.2 install pdo_sqlsrv-5.3.0
sudo bash -c 'echo "extension=sqlsrv.so" > /etc/php/7.2/mods-available/sqlsrv.ini'
sudo bash -c 'echo "extension=pdo_sqlsrv.so" > /etc/php/7.2/mods-available/pdo_sqlsrv.ini'
High CPU from kworker/0:x-kacpi_notify
Ubuntu 20.04 LTS
Update: this problem is fixed after I did "apt dist-upgrade" on 9/21/2020
Update again: Acutally not fixed. It happened again after unplug/plug the usb-c hub.
I recently got a USB-C Hub (Targus ACA958USZ). When it's plugged in, the laptop gives high cpu from process
I've found a few USB-C hubs from various manufactures with the same problem. I think they are of the same chipset.
@pishangujeniya
pishangujeniya / reset-mysql-8-root-password-windows.md
Created December 5, 2019 18:04
Reset MySQL 8.0 root Password in Windows

Reset MySQL 8.0 root Password in Windows

  1. Stop the MySQL 8.0service from services
  2. Go to path C:\Program Files\MySQL\MySQL Server 8.0\bin and open cmd
  3. Run mysqld --console --skip-grant-tables --shared-memory
  4. Open new cmd in the same path
  5. Run following commands
  6. mysql -u root
  7. select authentication_string,host from mysql.user where user='root';
  8. UPDATE mysql.user SET authentication_string='' WHERE user='root';
@cutiko
cutiko / Readme.md
Created November 22, 2019 18:24
Git delete last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.

ORIGINAL did fork but search didn't helped me

@skanga
skanga / gist:39353a02142cbc26cc8cd339ffcfe2dc
Created December 27, 2018 11:06
Upgrade TLS on Centos 5 by building WGET, CURL and OPENSSL from scratch
# Download, compile and install openssl
mkdir ~/src/
cd ~/src/
wget https://www.openssl.org/source/openssl-1.0.2a.tar.gz
tar -zxvf openssl-*.tar.gz
cd openssl-*
./config -fpic shared
make
sudo make install
@A-Programmer
A-Programmer / GoogleReCaptchaV2.txt
Last active August 23, 2023 04:52
How to use reCaptcha v2 in ASP.NET
(Another way : https://github.com/tanveery/recaptcha-net)
1. Get secret key and site key from : https://www.google.com/recaptcha/admin
2. Add them to web config :
<add key="recaptcha-secret-key" value="...[secret key]" />
<add key="recaptcha-public-key" value="...[public-key]" />
3. Install Package :
PM > Install-Package ReCaptcha-AspNet
@rushipkar90
rushipkar90 / qmail commands
Created March 30, 2017 04:05
qmail commands
How To Manage QMail Queue In Linux Plesk
Ref URL
----------------
http://geeksterminal.com/qmail-commands-logs-plesk-server/580/
https://www.24x7servermanagement.com/blog/how-to-manage-qmail-queue-in-linux-plesk/
----------------
1) To check the mail queue in plesk from command line, you can use the command :