Skip to content

Instantly share code, notes, and snippets.

View rverrips's full-sized avatar

Roy Verrips rverrips

View GitHub Profile
@rverrips
rverrips / EXAMPLE - Querying Incident table from client-side script.js ServiceNow EfficientGlideRecord: A MUCH more efficient and performant client-side GlideRecord queries, as efficient as GlideAjax (or more!)
//Client-side
doThing();
function doThing() {
let eGR = new EfficientGlideRecord('incident')
.setLimit(10)
.addNotNullQuery('assignment_group')
.addField('number')
.addField('short_description')
.addField('assignment_group', true) //Get display value as well
@rverrips
rverrips / README.md
Last active November 8, 2018 00:17 — forked from denvazh/README.md
Scheduled update for homebrew

Scheduled updates for homebrew

This two launchdaemon scripts provide scheduled updates and upgrade for homebrew packages.

It will run in the following way:

  • brew update every day at 12:10
  • brew upgrade every day at 12:20

How to installload

@rverrips
rverrips / Howto convert a PFX to a seperate .key & .crt file
Created November 7, 2017 23:34 — forked from TemporaryJam/Howto convert a PFX to a seperate .key & .crt file
How to convert a .pfx SSL certificate to .crt/key (pem) formats. Useful for NGINX
source: http://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/
`openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]`
What this command does is extract the private key from the .pfx file. Once entered you need to type in the importpassword of the .pfx file. This is the password that you used to protect your keypair when you created your .pfx file. If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to import it again, anywhere!. Once you entered the import password OpenSSL requests you to type in another password, twice!. This new password will protect your .key file.
Now let’s extract the certificate:
`openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]`

Keybase proof

I hereby claim:

  • I am rverrips on github.
  • I am rverrips (https://keybase.io/rverrips) on keybase.
  • I have a public key ASAC4DGUn4G8mafCQw05vWpLd6W7et-01rq2UDvTrjQK9Ao

To claim this, I am signing this object:

@rverrips
rverrips / Howto-Migrate-MySQL.md
Created December 4, 2016 13:23
How To Migrate a MySQL Database Between Two Servers

How To Migrate a MySQL Database Between Two Servers Transferring a database between virtual private servers can be accomplished using a SCP (Secure Copy), a method of copying files derived from the SSH Shell. Keep in mind, you will need to know the passwords for both virtual servers.

In order to migrate the database, there are two steps:

Step One—Perform a MySQL Dump Before transferring the database file to the new VPS, we first need to back it up on the original virtual server by using the mysqldump command.

mysqldump -u root -p --opt [database name] > [database name].sql After the dump is performed, you are ready to transfer the database.

@rverrips
rverrips / webmin-install.sh
Created May 19, 2016 20:38
Recipe to Install Current Webmin on Debian/Ubuntu
#Install Perl Dependancies
apt-get install -f -y perl libnet-ssleay-perl openssl libauthen-pam-perl \
libpam-runtime libio-pty-perl libdbd-pg-perl apt-show-versions python
#Download Most Current Version Webmin
wget -c http://www.webmin.com/download/deb/webmin-current.deb
#Install Webmin
dpkg --install webmin-current.deb
@rverrips
rverrips / gist:2b5e7e3e5882f245088b
Last active November 16, 2015 18:38 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat

#Buffalo Network Attachable Storage

As discussed you're free to have this Buffalo HS-DH500GL 500GB NAS to use a media server, etc. I believe it can be used in conjunction with external USB drive, but I've never really tried ... It is now more than 6 years old, so if it doesn't work as a media server, don't try too hard :)

It's on DHCP - If you can't find the IP assigned through your router, or just for kicks, download the NAS Navigator, which will find it on your network and also allow you to set a fixed IP, etc. if needed.

http://www.buffalotech.com/support-and-downloads/download/nasnavi-281.zip

Once you get the IP, the below should suffice.

@rverrips
rverrips / apiCCB.php
Last active August 29, 2015 14:14 — forked from JDMcKinstry/apiCCB.php
<?
/***
* class apiCCB
*
* @author Jeremiah D. McKinstry <[email protected]>
* @date Wednesday, August 14, 2013
* @version 1.0.0
* @see https://cdn6.ccbchurch.com/2/documents/pwt_implement.pdf
*
* @copyright This class is free: you can redistribute it and/or modify
@rverrips
rverrips / VLAN-Details
Created July 7, 2014 16:33
HP IMC Database query for VLANs
/** Pulls data from various tables in HP IMC 7.0 Database to:
Show all details for a specific VLAN across a campus.
Useful for sizing a migration of that VLAN to another VLAN, etc.
Change the VLan PVID on the "Where" section .. the example listes uas pv=6.
**/
SELECT [report_db].[report].[plat_v_dev].[symbol_name] AS Name,
[report_db].[report].[plat_v_dev].[dev_ip] AS IP,
[report_db].[report].[plat_v_dev].[dev_series_name] AS Series,
[report_db].[report].[plat_v_phy_if_info].[ifoptstatus] AS Status,