Skip to content

Instantly share code, notes, and snippets.

@jonathanbossenger
jonathanbossenger / sitesetup.sh
Last active April 25, 2024 23:13
Bash script to automatically provision LAMP sites
#!/bin/bash
# Bash script to set up local site using LAMP on Ubuntu
# Requires Apache2, MySQL, mkcert (https://github.com/FiloSottile/mkcert)
# See also sitedrop.sh https://gist.github.com/jonathanbossenger/4950e107b0004a8ee82aae8b123cce58
HOME_USER=jonathan
SSL_CERTS_DIRECTORY=/home/jonathan/ssl-certs
SITES_DIRECTORY=/home/jonathan/development/websites
@psignoret
psignoret / ADAL_with_vanilla_JS.md
Last active May 11, 2021 14:15
Minimal sample app using ADAL.JS and vanilla JavaScript

Using ADAL.JS with vanilla JavaScript

A minimal sample app using ADAL.JS and plain old vanilla JavaScript to obtain an access token from Azure Active Directory and use that access token to make an API request. In this case, the API we're requesting a token for is the Microsoft Graph API, which is used to retrieve the signed-in user's basic profile.

You can see (and test) this live at: https://bl.ocks.org/psignoret/raw/50e88652ae5cb6cc157c09857e3ba87f/

@ruzickap
ruzickap / ovftool_installation.sh
Created September 27, 2014 13:37
OVFTool installation on ESXi
#Download OVF tools
wget -q ftp://ftp.example.com/software/vmware/installation_scripts/vmware-ovftool.tar.gz -O /vmfs/volumes/My_Datastore/vmware-ovftool.tar.gz
# Extract ovftool content to /vmfs/volumes/My_Datastore
tar -xzf /vmfs/volumes/My_Datastore/vmware-ovftool.tar.gz -C /vmfs/volumes/My_Datastore/
rm /vmfs/volumes/My_Datastore/vmware-ovftool.tar.gz
# Modify the ovftool script to work on ESXi
sed -i 's@^#!/bin/bash@#!/bin/sh@' /vmfs/volumes/My_Datastore/vmware-ovftool/ovftool
@cferdinandi
cferdinandi / README.md
Last active May 22, 2020 13:24
Two simple functions for getting the ID of next and previous pages (not posts) in Wordpress. Forked from the "Next Page, Not Next Post" plugin by Matt McInvale. http://wordpress.org/plugins/next-page-not-next-post/

Functions

Next Page: next_page_ID($id) Previous Page: previous_page_ID($id)

$id: The ID of the page you're trying to get the next or previous page for.

Examples