Skip to content

Instantly share code, notes, and snippets.

View iamcryptoki's full-sized avatar

Gael Gentil iamcryptoki

View GitHub Profile
@iamcryptoki
iamcryptoki / salesforce_apex_encryption_decryption.cls
Last active September 19, 2020 03:42
Encrypt and decrypt data in Salesforce using Apex Crypto class.
// Generate your own initialization vector
Blob iv = Blob.valueOf('Lorem ipsum dolor sit amet');
// Generate an AES key
Blob key = Crypto.generateAesKey(256);
// Generate the data to be encrypted
Blob data = Blob.valueof('Encrypt everything!');
// Encrypt the data
@iamcryptoki
iamcryptoki / xen.cfg
Created February 26, 2017 20:03
Xen configuration for a working Qubes OS 4.x boot on a Macbook Pro 13-Inch Retina (Late-2013).
[global]
default=4.4.14-11.pvops.qubes.x86_64
[4.4.14-11.pvops.qubes.x86_64]
options=loglvl=all
kernel=vmlinuz-4.4.14-11.pvops.qubes.x86_64 root=/dev/mapper/qubes_dom0-root vconsole.font=latarcyrheb-sun16 rd.lvm.lv=qubes_dom0/root i915.preliminary_hw_support=1 rd.blacklist.drivers=radeon radeon.modeset=0
ramdisk=initramfs-4.4.14-11.pvops.qubes.x86_64.img
mapbs=1
noexitboot=1
@iamcryptoki
iamcryptoki / fix_dnf_yum_database.txt
Last active July 6, 2020 18:20
Fix RPM/DNF/YUM database (BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery).
cd /var/lib/rpm/
mv __db.00* /tmp
rpm --rebuilddb
@iamcryptoki
iamcryptoki / git_gpg_configuration.txt
Last active November 11, 2019 15:47
Configure Git to sign commits and tags using GPG.
git config --global user.signingKey <PASTE_YOUR_KEY_ID_HERE>
git config --global commit.gpgsign true
git config --global tag.gpgsign true
@iamcryptoki
iamcryptoki / .pypirc
Last active September 16, 2017 10:54
Sample PyPI configuration file.
# Place this file in your $HOME directory.
# Set file permissions: chmod 600 ~/.pypirc
[distutils]
index-servers =
pypi
testpypi
[pypi]
# python setup.py sdist upload -r pypi
@iamcryptoki
iamcryptoki / virtualbox.repo
Created April 13, 2018 07:45
VirtualBox repo file for Oracle Linux, RHEL and CentOS.
# /etc/yum.repos.d
[virtualbox]
name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc
@iamcryptoki
iamcryptoki / docker-compose.yml
Created July 6, 2018 08:28
Docker Compose file for my Nextcloud installation.
version: '3'
volumes:
nextcloud:
db:
services:
db:
image: mariadb
env_file:
@iamcryptoki
iamcryptoki / nextcloud.env
Created July 6, 2018 08:32
Environment file for my Nextcloud installation using Docker Compose.
# https://gist.github.com/iamcryptoki/f56ec8af05cebed39fad40f718e393cf
MYSQL_ROOT_PASSWORD=***********************
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud
MYSQL_PASSWORD=************************************
MYSQL_HOST=db
NEXTCLOUD_VERSION=13.0
NEXTCLOUD_ADMIN_USER=example
@iamcryptoki
iamcryptoki / letsencrypt_certbot_wirldcard_certificate.txt
Created July 6, 2018 08:37
Let's Encrypt (Certbot) Wildcard certificate.
certbot certonly --server https://acme-v02.api.letsencrypt.org/directory --manual --preferred-challenges dns -d '*.example.com' --email [email protected]
@iamcryptoki
iamcryptoki / uname.txt
Last active September 21, 2018 14:03
uname options
uname [OPTION]
-a, --all Prints all information, omitting -p and -i if the information is unknown.
-s, --kernel-name Print the kernel name.
-n, --nodename Print the network node hostname.
-r, --kernel-release Print the kernel release.
-v, --kernel-version Print the kernel version.
-m, --machine Print the machine hardware name.
-p, --processor Print the processor type, or "unknown".
-i, --hardware-platform Print the hardware platform, or "unknown".