Skip to content

Instantly share code, notes, and snippets.

Sam Stevens samuelstevens9

  • Evansville, IN
Block or report user

Report or block samuelstevens9

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
andrewlimaza / example_pmpro_has_membership.php
Created Dec 20, 2016
Example of pmpro_hasMembershipLevel() usage
View example_pmpro_has_membership.php
//You may either create a function or place this code in a custom page template.
//Find more here ->
if( is_user_logged_in() ){
if( pmpro_hasMembershipLevel( 'silver' ) ){
//show this for 'silver level'
hunan-rostomyan / getCookie.ts
Created Jul 19, 2016
Get a cookie by name in TypeScript
View getCookie.ts
// Given a cookie key `name`, returns the value of
// the cookie or `null`, if the key is not found.
function getCookie(name: string): string {
const nameLenPlus = (name.length + 1);
return document.cookie
.map(c => c.trim())
.filter(cookie => {
return cookie.substring(0, nameLenPlus) === `${name}=`;
luislobo /
Last active Mar 8, 2019 — forked from wdullaer/
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp:// --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb docker main > /etc/apt/sources.list.d/docker.list"
xdamman /
Created Jul 2, 2014
Install latest ffmpeg on ubuntu 12.04 or 14.04
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
bhurlow / gist:3043629
Created Jul 3, 2012
Linux Screen Cheat Sheets
View gist:3043629
–ctrl a c -> cre­ate new win­dow
–ctrl a A -> set win­dow name
–ctrl a w -> show all win­dow
–ctrl a 1|2|3|… -> switch to win­dow n
–ctrl a ” -> choose win­dow
–ctrl a ctrl a -> switch between win­dow
–ctrl a d -> detach win­dow
–ctrl a ? -> help
–ctrl a [ -> start copy, move cur­sor to the copy loca­tion, press ENTER, select the chars, press ENTER to copy the selected char­ac­ters to the buffer
–ctrl a ] -> paste from buffer
You can’t perform that action at this time.