Skip to content

Instantly share code, notes, and snippets.

View DennisLfromGA's full-sized avatar
🏠
Working from home

DennisL DennisLfromGA

🏠
Working from home
  • SOHO
  • GA
  • 02:18 (UTC -12:00)
View GitHub Profile
@DennisLfromGA
DennisLfromGA / tp.bash
Created August 20, 2014 20:36
Shell (.bashrc, etc.) excerpt to turn off the Chromebook's touchpad
# Turnoff the Chromebook Touchpad - always -
# NOTE: 'tpstat.sh' & 'tpoff.sh' should be in your PATH
## Get state of Touchpad - 1=on, 0=off
TP_STATE="`tpstat.sh`"
#
# Turn off Touchpad
if [ "$TP_STATE" = 0 ]; # TOUCHPAD IS OFF
then echo "'touchpad' already off"
else echo "Turning Touchpad off to ignore inadvertent touching..." ; tpoff.sh
fi
@DennisLfromGA
DennisLfromGA / tpstat.sh
Created August 20, 2014 20:29
A shell script to get the Chromebook's touchpad status
### Script to get the status of the Trackpad device
#DEBUG=''
[[ -n "$DEBUG" ]] && set -x
TP=''
TPSTATE=''
TPSTATUS=''
#VERBOSE=''
## Get Trackpad ID number from Crosh
#+ Write a custom crosh script to get the trackpad id number
@DennisLfromGA
DennisLfromGA / tpoff.sh
Created August 20, 2014 20:27
A shell script to turn off the Chromebook's touchpad
### Script to turn OFF the Trackpad device
#DEBUG=''
[[ -n "$DEBUG" ]] && set -x
TP=''
#VERBOSE=''
## Get Trackpad ID number from Crosh
#+ Write a custom crosh script to get the trackpad id number
echo "crosh <<ENDCROSH
inputcontrol --names
@DennisLfromGA
DennisLfromGA / tpon.sh
Created August 20, 2014 20:26
A shell script to turn on the Chromebook's Touchpad
### Script to turn ON the Trackpad device
#DEBUG=''
[[ -n "$DEBUG" ]] && set -x
TP=''
#VERBOSE=''
## Get Trackpad ID number from Crosh
#+ Write a custom crosh script to get the trackpad id number
echo "crosh <<ENDCROSH
inputcontrol --names
@DennisLfromGA
DennisLfromGA / crl
Last active August 29, 2015 14:04
A shell script to list the chroot location and chroot name(s) and optionally show the chroot's 'architecture' or complete 'croutonversion' info.
#!/bin/sh -e
# Copyright (c) 2014 The crouton Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
APPLICATION="${0##*/}"
CHROOT_LOC='/usr/local/chroots'
[ -d /var/crouton/chroots ] && CHROOT_LOC='/var/crouton/chroots'
[ ! -d "$CHROOT_LOC" ] && CHROOT_LOC=''
CHROOT_NAME=''
@DennisLfromGA
DennisLfromGA / enable-vmx.sh
Last active May 5, 2017 00:35
ChromeOS script to re-write the current kernel configuration to enable VT-x extensions and lsm.module locking for virtualbox/virtualization. Based on steps provided by @zwxfzzzjr on the crouton github site here - https://github.com/dnschneid/crouton/issues/675#issuecomment-40567742
#!/bin/sh -e
C_ROOT=''
C_KERNEL=''
##
## Exits the script with exit code $1, spitting out message $@ to stderr
error() {
local ecode="$1"
shift
echo "$*" 1>&2
exit "$ecode"
@DennisLfromGA
DennisLfromGA / mnt-crouton.conf
Created April 19, 2014 02:30
A Chromebook init script to mount the CROUTON partition - made possible via @drinkcat's crouton/separate_partition branch
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "mount CROUTON on /var/crouton"
author "drinkcat & DennisLfromGA"
start on starting boot-services
task
script
@DennisLfromGA
DennisLfromGA / crv
Created March 20, 2014 00:14
A shell script to display the 'crouton' version in the host and optionally update it. If a local version of 'crouton' cannot be found it downloads & installs one. Also, optionally displays the croutonversion and architecture ([-s option]) and other info. ([-v option]) about all [default] or given chroots.
#!/bin/sh
###
### Set Variables
APPLICATION="${0##*/}"
CHECK_IT=''
CHROOT_LOC=/usr/local/chroots
[ -d /var/crouton/chroots ] && CHROOT_LOC='/var/crouton/chroots'
[ ! -d "$CHROOT_LOC" ] && CHROOT_LOC=''
CHROOT_NAME=''
@DennisLfromGA
DennisLfromGA / screencast
Last active January 3, 2016 09:19
A script to capture a 'screencast' on your Chromebook via 'crouton' (http://goo.gl/fd3zc) by David Schneider. This is a modified version of the original script 'screencast.sh' (http://goo.gl/UmWAta) by Francois Beaufort.
#!/bin/bash -e
## A script to capture a 'screencast' on your Chromebook via 'crouton' (http://goo.gl/fd3zc) by David Schneider.
#+ This is a modified version of the original script 'screencast.sh' (http://goo.gl/UmWAta) by Francois Beaufort.
#+ This 'screencast' modified source (and author) can be found here - (https://gist.github.com/DennisLfromGA/8441689)
# Needs to run in bash so do it.
if [ -z "$BASH_VERSION" ]; then exec bash -e "$0" "$@"; fi
APPLICATION="${0##*/}"
ARGNUM="$#"
@DennisLfromGA
DennisLfromGA / sme.mount
Last active January 1, 2016 06:29
A shell script to mount or unmount your SMEStorage Cloud Provider folders for local access.<p>Refer to http://storagemadeeasy.com/ for features and details.
#!/bin/sh -e
# Mount SMEStorage Cloud folders locally
Bname="${0##*/}"
Crosh_Loc=''
Local_User="$(id -un)"
SMEmount=''
Umount=''
USAGE="
${Bname} [options]