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
  • 15:08 (UTC -12:00)
View GitHub Profile
@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 / 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 / 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 / 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 / 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 / crouton.init
Last active March 17, 2024 14:58
An external control file for adjusting six parameters in 'crouton.conf' to invoke a crouton chroot.
##########################################################################
##* crouton.conf defaults are: ##
# DELAY=10 # delay desired number of seconds before starting ##
# CHROOT=xenial # enter desired chroot to start ##
# START_DE=startxfce4 # enter desired Desktop Envirnoment to use ##
# CHROOT_APP=none # enter desired chroot application to run ##
# XMETHOD=default # enter the desired XMETHOD (xorg,xephyr,xiwi) ##
# RUN_STATE=y # change to 'n' to disable running $CHROOT ##
##########################################################################
@DennisLfromGA
DennisLfromGA / name
Last active May 5, 2024 16:30
A bash script to gather pertinent system info. For debian, arch, crunchbang, raspbian, chromeos, and other *nix distros.
## for default bash
#!/usr/bin/env bash
# for termux bash
##!/data/data/com.termux/files/usr/bin/bash
# name - A script to gather pertinent system info.
#
APPLICATION="${0##*/}"
TMPDIR='/tmp'
@DennisLfromGA
DennisLfromGA / mnt-chrubuntu.conf
Last active September 6, 2020 13:10
A Chromebook init script to mount a ChrUbuntu partition (#7 / ROOT-C) at boot.
# 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 CHRUBUNTU on /var/ChrUbuntu-sda7"
author "DennisLfromGA@github.com & drinkcat@github.com"
start on starting boot-services
task
script
@DennisLfromGA
DennisLfromGA / chromecast-daily-wallpaper
Last active July 10, 2017 14:03
Simple command line tool which will grab a random wallpaper # from the Chromecast backgrounds repository at # https://github.com/dconnolly/chromecast-backgrounds
#!/bin/bash
# Chromecast-daily-wallpaper
# Version 0.2
#
# Simple command line tool which will grab a random wallpaper
# from the Chromecast backgrounds repository at
# https://github.com/dconnolly/chromecast-backgrounds
#
# Depends: lynx, nitrogen
#
@DennisLfromGA
DennisLfromGA / mywanip
Created August 25, 2015 18:29
Script to grab your WAN IP address using various means.
#!/usr/bin/env sh
ipurl="icanhazip.com"
if hash dig 2>/dev/null; then cmd="dig +short myip.opendns.com @resolver1.opendns.com"; ipurl=""
elif hash curl 2>/dev/null; then cmd="curl"
elif hash wget 2>/dev/null; then cmd="wget -qO-"
else echo "*** No app (dig,curl,wget) found - exiting ***"; exit 2; fi
[ -n "$1" ] && echo -n "$cmd $ipurl - "
eval $cmd $ipurl || ret=$?
exit $ret