Skip to content

Instantly share code, notes, and snippets.

@dublado
dublado / Secureboot + Ubuntu + VirtualBox Signing kernel modules.md
Last active May 10, 2024 23:59
Secureboot + Ubuntu + VirtualBox Signing kernel modules

Install the virtualbox manually

sudo apt-get update  
sudo apt-get install virtualbox-6.1  

Sign the modules for secureboot

sudo -i  
mkdir /root/module-signing  
cd /root/module-signing  
@abaksy
abaksy / mysql-jdbc-ubuntu-install.md
Last active October 30, 2023 06:43
mysql-jdbc-ubuntu-install

Super duper cool guide for installing MySQL (MariaDB actually) and JDBC on Ubuntu 20.04

  1. Install mariadb server using: sudo apt install mariadb-server

  2. Install the Java library for MariaDB using: sudo apt install libmariadb-java

  3. Start the mariadb service using: sudo /etc/init.d/mysql start

  4. Now you will login to the mariaDB and create a new user that does not need root a) Connect to MY-SQL using: sudo mysql -u root

@huzemin
huzemin / laravel-encrypt.js
Created December 3, 2019 06:47
laravel Encrypt convert to CryptoJS in Javascript
import CryptoJS from "crypto-js";
const LaravelEncrypt = function (key) {
this.key = key;
}
LaravelEncrypt.prototype.decrypt = function (encryptStr) {
encryptStr = CryptoJS.enc.Base64.parse(encryptStr);
let encryptData = encryptStr.toString(CryptoJS.enc.Utf8);
encryptData = JSON.parse(encryptData);
@yubing24
yubing24 / account.component.html
Created August 9, 2018 05:51
Angular Material Side Navigation with Expandable Menus
<mat-toolbar color="accent">
<button mat-icon-button matTooltip="Application Menu" (click)="sidenav.toggle()">
<mat-icon>settings</mat-icon>
</button>
Account Settings
<span style="flex: 1 1 auto;"></span>
<div>
<button mat-icon-button matTooltip="Switch Apps">
<mat-icon>apps</mat-icon>
</button>
@jeanne007
jeanne007 / How_to_install_OCI8_in_windows.md
Last active April 25, 2024 06:10
How to install OCI8 in windows

How to install OCI8 in windows

Instantclient Version 12.2.0.1.0

Xampp
php 7.2.4
Windows 10

Step 1

Download OCI8 2.1.8 - 7.2 Thread Safe (TS) x86

@vlucas
vlucas / encryption.js
Last active May 8, 2024 06:55
Stronger Encryption and Decryption in Node.js
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv);