Skip to content

Instantly share code, notes, and snippets.

View vizion8-dan's full-sized avatar
🐈‍⬛
on va cat ion

Adriano vizion8-dan

🐈‍⬛
on va cat ion
  • BLK-CAMOCAT
  • In the middle of...
View GitHub Profile
@pshchelo
pshchelo / mount-qcow2-lvm-image.sh
Last active May 27, 2025 19:42
List of commands to mount/unmount a qcow2 image conatining LVM partitions.
# kudos to dzaku at consolechars.wordpress.com
### MOUNT qcow2 image with lvm partitions
# ensure nbd can handle that many partitions
sudo modprobe nbd max_part=8
# present image as block device through NBD
sudo qemu-nbd --connect=/dev/nbd0 <image.qcow2>
@andrastudio
andrastudio / vc-fonts.php
Created September 19, 2016 02:07
Add new google fonts to Visual Composer Custom Heading
if ( ! function_exists( 'helper_vc_fonts' ) ) {
function helper_vc_fonts( $fonts_list ) {
$poppins->font_family = 'Poppins';
$poppins->font_types = '300 light regular:300:normal,400 regular:400:normal,500 bold regular:500:normal,600 bold regular:600:normal,700 bold regular:700:normal';
$poppins->font_styles = 'regular';
$poppins->font_family_description = esc_html_e( 'Select font family', 'helper' );
$poppins->font_style_description = esc_html_e( 'Select font styling', 'helper' );
$fonts_list[] = $poppins;
return $fonts_list;
@zecka
zecka / vc_custom_icon_set.php
Last active October 7, 2020 08:17
Add a custom icon set from icomoon to visual composer vc_icon shortcode
<?php
// Add new custom font to Font Family selection in icon box module
function zeckart_add_new_icon_set_to_iconbox( ) {
$param = WPBMap::getParam( 'vc_icon', 'type' );
$param['value'][__( 'IcoMoon', 'total' )] = 'icomoon';
vc_update_shortcode_param( 'vc_icon', $param );
}
add_filter( 'init', 'zeckart_add_new_icon_set_to_iconbox', 40 );
@CodeMyUI
CodeMyUI / elite-dangerous-inspired-loader-pure-css.markdown
Created January 20, 2017 04:09
Elite Dangerous Inspired Loader - Pure CSS
@CodeMyUI
CodeMyUI / index.html
Created February 15, 2017 06:08
Infinity loader
<div class="loading">
<svg width="300px" height="200px" viewBox="0 0 187.3 93.7" preserveAspectRatio="xMidYMid meet">
<path id="infinity-outline" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"
d="M93.9,46.4c9.3,9.5,13.8,17.9,23.5,17.9s17.5-7.8,17.5-17.5s-7.8-17.6-17.5-17.5c-9.7,0.1-13.3,7.2-22.1,17.1 c-8.9,8.8-15.7,17.9-25.4,17.9s-17.5-7.8-17.5-17.5s7.8-17.5,17.5-17.5S86.2,38.6,93.9,46.4z" />
<path id="infinity-bg" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"
d="M93.9,46.4c9.3,9.5,13.8,17.9,23.5,17.9s17.5-7.8,17.5-17.5s-7.8-17.6-17.5-17.5c-9.7,0.1-13.3,7.2-22.1,17.1 c-8.9,8.8-15.7,17.9-25.4,17.9s-17.5-7.8-17.5-17.5s7.8-17.5,17.5-17.5S86.2,38.6,93.9,46.4z" />
</div>
@bunchc
bunchc / gpg-import-and-export-instructions.md
Created April 5, 2017 14:36 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@bunchc
bunchc / script_custom.ps1
Last active December 10, 2021 18:47
Windows 10 customization script
# Install chocolatey & boxstarter
Set-ExecutionPolicy AllSigned; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
. { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
# Basic setup
Write-Host "Setting execution policy"
Update-ExecutionPolicy Unrestricted
###########################################
# Update Windows and reboot if necessary #
@mgeeky
mgeeky / openvas-automate.sh
Last active November 12, 2023 19:15
OpenVAS automation script.
#!/bin/bash
#
# OpenVAS automation script.
# Mariusz B. / mgeeky, '17
# v0.2
#
trap ctrl_c INT
# --- CONFIGURATION ---
@kingkool68
kingkool68 / svg-functions.php
Created August 4, 2017 03:22
SVG helper functions for WordPress
<?php
// Throw this in your theme and include it in your functions.php file
/**
* Helper function for fetching SVG icons
*
* @param string $icon Name of the SVG file in the icons directory
* @return string Inline SVG markup
*/
function wp_svg_icon( $icon = '' ) {
@bunchc
bunchc / userdata-hardening-ufw
Created August 20, 2017 15:40
UserData Hardening script with UFW
#!/bin/bash
# user-data-hardening.sh
# Authors: Cody Bunch ([email protected])
#
# Script intended to be supplied as userdata to a cloud of some flavor.
# Enables some sane sysctl defaults, turns up iptables, and
# installs a HIDS / NIDS package
# Supply your email here
email_address="[email protected]"