Skip to content

Instantly share code, notes, and snippets.

View Llewellynvdm's full-sized avatar
🏗️
Working on Joomla Component Builder

<<eWɘ>>yn Llewellynvdm

🏗️
Working on Joomla Component Builder
View GitHub Profile
@Llewellynvdm
Llewellynvdm / conky_orange_4k.lua
Last active October 17, 2018 15:41 — forked from anonymous/conky_orange_4k.lua
conky orange 4k resolution config files
--==============================================================================
-- conky_orange.lua
--
-- author : SLK
-- version : v2011062101
-- license : Distributed under the terms of GNU GPL version 2 or later
--
-- modified: me
-- version : v20171027
-- notes : works on 4k screen. uses conky conf newer >v1.1
ALTER TABLE `#__componentbuilder_joomla_component` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_joomla_component` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_admin_view` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_admin_view` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_custom_admin_view` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_custom_admin_view` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_site_view` ENGINE = InnoDB;
@Llewellynvdm
Llewellynvdm / forticlientsslvpn-expect.sh
Created August 30, 2018 12:17 — forked from mgeeky/forticlientsslvpn-expect.sh
Simple script intended to automate Fortinet SSL VPN Client connection on Linux using expect scripting.
#!/bin/bash
# Forticlient SSL VPN Client launching script utilizing expect.
# --------------------------------------------
# CONFIGURATION
# If empty - script will take some simple logic to locate appropriate binary.
FORTICLIENT_PATH=""
@Llewellynvdm
Llewellynvdm / CustomScriptDocument.php
Created April 6, 2018 07:33
Drag and Drop Upload functionality in JCB
// load the links on the page
$document->addScriptDeclaration("var documentsLinks = " . json_encode($this->item->links) . ";");
@Llewellynvdm
Llewellynvdm / display.js
Last active February 3, 2022 16:46
Upload Script
// see if we have a banner
<?php if (isset($this->item->banner) && [[[Component]]]Helper::checkString($this->item->banner)) : ?>
jQuery('<img src="<?php echo $this->item->banner; ?>" class="your-class-banner" alt="banner">').insertAfter(jQuery('#jform_banner').closest('.control-group'));
<?php endif; ?>
@Llewellynvdm
Llewellynvdm / .gitignore
Last active May 30, 2022 13:49 — forked from mrkmg/file_extension_to_mimetype.php
File Extension to Mimetype
.idea
@Llewellynvdm
Llewellynvdm / explanation.md
Created February 4, 2018 00:18 — forked from masak/explanation.md
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

@Llewellynvdm
Llewellynvdm / fancyDate.txt
Last active March 2, 2018 02:36
fancyDate
/**
* Change to nice fancy date (change was made)
*/
public static function fancyDate($date)
{
if (!self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('jS \o\f F Y',$date);
@Llewellynvdm
Llewellynvdm / Requests.php
Created August 6, 2017 20:30 — forked from xeoncross/Requests.php
cURL asynchronous requests using curl_multi and callbacks
<?php
/**
* Make asynchronous requests to different resources as fast as possible and process the results as they are ready.
*/
class Requests
{
public $handle;
public function __construct()
{
@Llewellynvdm
Llewellynvdm / id_rsa_encryption.md
Created July 4, 2017 12:52
Encrypt/Decrypt a File using your SSH Public/Private Key on Mac OS X

A Guide to Encrypting Files with Mac OS X

This guide will demonstrate the steps required to encrypt and decrypt files using OpenSSL on Mac OS X. The working assumption is that by demonstrating how to encrypt a file with your own public key, you'll also be able to encrypt a file you plan to send to somebody else using their private key, though you may wish to use this approach to keep archived data safe from prying eyes.

Too Long, Didn't Read

Assuming you've already done the setup described later in this document, that id_rsa.pub.pcks8 is the public key you want to use, that id_rsa is the private key the recipient will use, and secret.txt is the data you want to transmit…

Encrypting

$ openssl rand 192 -out key

$ openssl aes-256-cbc -in secret.txt -out secret.txt.enc -pass file:key