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
@benjamincharity
benjamincharity / autonomous.txt
Last active May 20, 2020
Instructions on how to reset the autonomous desk. This fixes a problem where the desk will not lower (also reportedly fixes incorrectly reported heights).
View autonomous.txt
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these
> steps thoroughly.
Reset Steps:
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds.
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass.
3. Release both buttons.
4. Press the down buttons until the desk beeps one more time or 20 seconds pass.
@andrewlimaza
andrewlimaza / example_pmpro_has_membership.php
Created Dec 20, 2016
Example of pmpro_hasMembershipLevel() usage
View example_pmpro_has_membership.php
<?php
//You may either create a function or place this code in a custom page template.
//Find more here -> https://www.paidmembershipspro.com/documentation/content-controls/require-membership-function/
if( is_user_logged_in() ){
if( pmpro_hasMembershipLevel( 'silver' ) ){
//show this for 'silver level'
@hunan-rostomyan
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
.split(';')
.map(c => c.trim())
.filter(cookie => {
return cookie.substring(0, nameLenPlus) === `${name}=`;
})
@jarretmoses
jarretmoses / React Native Clear Cache
Last active May 28, 2020
Clearing the Cache of your React Native Project
View React Native Clear Cache
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@luislobo
luislobo / install_latest_docker_compose.sh
Last active Mar 8, 2019 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
View install_latest_docker_compose.sh
# 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://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@xdamman
xdamman / install_ffmpeg_ubuntu.sh
Created Jul 2, 2014
Install latest ffmpeg on ubuntu 12.04 or 14.04
View install_ffmpeg_ubuntu.sh
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# 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
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.