First Commit
This commit is contained in:
commit
af15154277
2
.directory
Normal file
2
.directory
Normal file
@ -0,0 +1,2 @@
|
||||
[Desktop Entry]
|
||||
Icon=folder
|
1
360controller
Executable file
1
360controller
Executable file
@ -0,0 +1 @@
|
||||
sudo xboxdrv --silent
|
1
Laptop/360controller
Executable file
1
Laptop/360controller
Executable file
@ -0,0 +1 @@
|
||||
sudo xboxdrv --silent
|
217
Laptop/back_up_original__lightsOn.sh
Executable file
217
Laptop/back_up_original__lightsOn.sh
Executable file
@ -0,0 +1,217 @@
|
||||
#!/bin/bash
|
||||
# lightsOn.sh
|
||||
|
||||
# Copyright (c) 2011 iye.cba at gmail com
|
||||
# url: https://github.com/iye/lightsOn
|
||||
# This script is licensed under GNU GPL version 2.0 or above
|
||||
|
||||
# Description: Bash script that prevents the screensaver and display power
|
||||
# management (DPMS) to be activated when you are watching Flash Videos
|
||||
# fullscreen on Firefox and Chromium.
|
||||
# Can detect mplayer and VLC when they are fullscreen too but I have disabled
|
||||
# this by default.
|
||||
# lightsOn.sh needs xscreensaver, kscreensaver or gnome-screensaver to work.
|
||||
|
||||
# HOW TO USE: Start the script with the number of seconds you want the checks ./lightsOn.sh 590 &
|
||||
# for fullscreen to be done. Example:
|
||||
# "./lightsOn.sh 120 &" will Check every 120 seconds if Mplayer,
|
||||
# VLC, Firefox or Chromium are fullscreen and delay screensaver and Power Management if so.
|
||||
# You want the number of seconds to be ~10 seconds less than the time it takes
|
||||
# your screensaver or Power Management to activate.
|
||||
# If you don't pass an argument, the checks are done every 50 seconds.
|
||||
|
||||
|
||||
# Modify these variables if you want this script to detect if Mplayer,
|
||||
# VLC or Firefox Flash Video are Fullscreen and disable
|
||||
# xscreensaver/kscreensaver/gnome-screensaver and PowerManagement.
|
||||
mplayer_detection=1
|
||||
vlc_detection=1
|
||||
firefox_flash_detection=1
|
||||
chromium_flash_detection=1
|
||||
html5_detection=0 #checks if the browser window is fullscreen; will disable the screensaver if the browser window is in fullscreen so it doesn't work correctly if you always use the browser (Firefox or Chromium) in fullscreen
|
||||
|
||||
|
||||
# YOU SHOULD NOT NEED TO MODIFY ANYTHING BELOW THIS LINE
|
||||
|
||||
|
||||
# enumerate all the attached screens
|
||||
displays=""
|
||||
while read id
|
||||
do
|
||||
displays="$displays $id"
|
||||
done< <(xvinfo | sed -n 's/^screen #\([0-9]\+\)$/\1/p')
|
||||
|
||||
# Detect screensaver been used (xscreensaver, kscreensaver, gnome-screensaver or none)
|
||||
if [ `pgrep -l xscreensaver | grep -wc xscreensaver` -ge 1 ];then
|
||||
screensaver=xscreensaver
|
||||
elif [ `pgrep -l gnome-screensav | grep -wc gnome-screensav` -ge 1 ];then
|
||||
screensaver=gnome-screensav
|
||||
elif [ `pgrep -l kscreensaver | grep -wc kscreensaver` -ge 1 ];then
|
||||
screensaver=kscreensaver
|
||||
else
|
||||
screensaver=None
|
||||
echo "No screensaver detected"
|
||||
fi
|
||||
|
||||
|
||||
checkFullscreen()
|
||||
{
|
||||
# loop through every display looking for a fullscreen window
|
||||
for display in $displays
|
||||
do
|
||||
#get id of active window and clean output
|
||||
activ_win_id=`DISPLAY=:0.${display} xprop -root _NET_ACTIVE_WINDOW`
|
||||
#activ_win_id=${activ_win_id#*# } #gives error if xprop returns extra ", 0x0" (happens on some distros)
|
||||
activ_win_id=${activ_win_id:40:9}
|
||||
|
||||
# Skip invalid window ids (commented as I could not reproduce a case
|
||||
# where invalid id was returned, plus if id invalid
|
||||
# isActivWinFullscreen will fail anyway.)
|
||||
#if [ "$activ_win_id" = "0x0" ]; then
|
||||
# continue
|
||||
#fi
|
||||
|
||||
# Check if Active Window (the foremost window) is in fullscreen state
|
||||
isActivWinFullscreen=`DISPLAY=:0.${display} xprop -id $activ_win_id | grep _NET_WM_STATE_FULLSCREEN`
|
||||
if [[ "$isActivWinFullscreen" = *NET_WM_STATE_FULLSCREEN* ]];then
|
||||
isAppRunning
|
||||
var=$?
|
||||
if [[ $var -eq 1 ]];then
|
||||
delayScreensaver
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# check if active windows is mplayer, vlc or firefox
|
||||
#TODO only window name in the variable activ_win_id, not whole line.
|
||||
#Then change IFs to detect more specifically the apps "<vlc>" and if process name exist
|
||||
|
||||
isAppRunning()
|
||||
{
|
||||
#Get title of active window
|
||||
activ_win_title=`xprop -id $activ_win_id | grep "WM_CLASS(STRING)"` # I used WM_NAME(STRING) before, WM_CLASS more accurate.
|
||||
|
||||
|
||||
|
||||
# Check if user want to detect Video fullscreen on Firefox, modify variable firefox_flash_detection if you dont want Firefox detection
|
||||
if [ $firefox_flash_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *unknown* || "$activ_win_title" = *plugin-container* ]];then
|
||||
# Check if plugin-container process is running
|
||||
flash_process=`pgrep -l plugin-containe | grep -wc plugin-containe`
|
||||
#(why was I using this line avobe? delete if pgrep -lc works ok)
|
||||
#flash_process=`pgrep -lc plugin-containe`
|
||||
if [[ $flash_process -ge 1 ]];then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Check if user want to detect Video fullscreen on Chromium, modify variable chromium_flash_detection if you dont want Chromium detection
|
||||
if [ $chromium_flash_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *exe* ]];then
|
||||
# Check if Chromium Flash process is running
|
||||
if [[ `pgrep -lfc "chromium-browser --type=plugin --plugin-path=/usr/lib/adobe-flashplugin"` -ge 1 || `pgrep -lfc "chromium-browser --type=plugin --plugin-path=/usr/lib/flashplugin-installer"` -ge 1 ]];then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#html5 (Firefox or Chromium full-screen)
|
||||
if [ $html5_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *chromium-browser* || "$activ_win_title" = *Firefox* ]];then
|
||||
#check if firefox or chromium is running.
|
||||
if [[ `pgrep -l firefox | grep -wc firefox` -ge 1 || `pgrep -l chromium-browse | grep -wc chromium-browse` -ge 1 ]]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#check if user want to detect mplayer fullscreen, modify variable mplayer_detection
|
||||
if [ $mplayer_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *mplayer* || "$activ_win_title" = *MPlayer* ]];then
|
||||
#check if mplayer is running.
|
||||
#mplayer_process=`pgrep -l mplayer | grep -wc mplayer`
|
||||
mplayer_process=`pgrep -lc mplayer`
|
||||
if [ $mplayer_process -ge 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Check if user want to detect vlc fullscreen, modify variable vlc_detection
|
||||
if [ $vlc_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *vlc* ]];then
|
||||
#check if vlc is running.
|
||||
#vlc_process=`pgrep -l vlc | grep -wc vlc`
|
||||
vlc_process=`pgrep -lc vlc`
|
||||
if [ $vlc_process -ge 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
delayScreensaver()
|
||||
{
|
||||
|
||||
# reset inactivity time counter so screensaver is not started
|
||||
if [ "$screensaver" == "xscreensaver" ]; then
|
||||
#This tells xscreensaver to pretend that there has just been user activity. This means that if the screensaver is active (the screen is blanked), then this command will cause the screen to un-blank as if there had been keyboard or mouse activity. If the screen is locked, then the password dialog will pop up first, as usual. If the screen is not blanked, then this simulated user activity will re-start the countdown (so, issuing the -deactivate command periodically is one way to prevent the screen from blanking.)
|
||||
xscreensaver-command -deactivate > /dev/null
|
||||
elif [ "$screensaver" == "gnome-screensav" ]; then
|
||||
dbus-send --session --type=method_call --dest=org.gnome.ScreenSaver --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.SimulateUserActivity > /dev/null
|
||||
elif [ "$screensaver" == "kscreensaver" ]; then
|
||||
qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity > /dev/null
|
||||
fi
|
||||
|
||||
|
||||
#Check if DPMS is on. If it is, deactivate and reactivate again. If it is not, do nothing.
|
||||
dpmsStatus=`xset -q | grep -ce 'DPMS is Enabled'`
|
||||
if [ $dpmsStatus == 1 ];then
|
||||
xset -dpms
|
||||
xset dpms
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
delay=$1
|
||||
|
||||
|
||||
# If argument empty, use 50 seconds as default.
|
||||
if [ -z "$1" ];then
|
||||
delay=50
|
||||
fi
|
||||
|
||||
|
||||
# If argument is not integer quit.
|
||||
if [[ $1 = *[^0-9]* ]]; then
|
||||
echo "The Argument \"$1\" is not valid, not an integer"
|
||||
echo "Please use the time in seconds you want the checks to repeat."
|
||||
echo "You want it to be ~10 seconds less than the time it takes your screensaver or DPMS to activate"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
while true
|
||||
do
|
||||
checkFullscreen
|
||||
sleep $delay
|
||||
done
|
||||
|
||||
|
||||
exit 0
|
||||
|
217
Laptop/backup_lightsOn.sh
Executable file
217
Laptop/backup_lightsOn.sh
Executable file
@ -0,0 +1,217 @@
|
||||
#!/bin/bash
|
||||
# lightsOn.sh
|
||||
|
||||
# Copyright (c) 2011 iye.cba at gmail com
|
||||
# url: https://github.com/iye/lightsOn
|
||||
# This script is licensed under GNU GPL version 2.0 or above
|
||||
|
||||
# Description: Bash script that prevents the screensaver and display power
|
||||
# management (DPMS) to be activated when you are watching Flash Videos
|
||||
# fullscreen on Firefox and Chromium.
|
||||
# Can detect mplayer and VLC when they are fullscreen too but I have disabled
|
||||
# this by default.
|
||||
# lightsOn.sh needs xscreensaver, kscreensaver or gnome-screensaver to work.
|
||||
|
||||
# HOW TO USE: Start the script with the number of seconds you want the checks
|
||||
# for fullscreen to be done. Example:
|
||||
# "./lightsOn.sh 120 &" will Check every 120 seconds if Mplayer,
|
||||
# VLC, Firefox or Chromium are fullscreen and delay screensaver and Power Management if so.
|
||||
# You want the number of seconds to be ~10 seconds less than the time it takes
|
||||
# your screensaver or Power Management to activate.
|
||||
# If you don't pass an argument, the checks are done every 50 seconds.
|
||||
|
||||
|
||||
# Modify these variables if you want this script to detect if Mplayer,
|
||||
# VLC or Firefox Flash Video are Fullscreen and disable
|
||||
# xscreensaver/kscreensaver/gnome-screensaver and PowerManagement.
|
||||
mplayer_detection=0
|
||||
vlc_detection=1
|
||||
firefox_flash_detection=1
|
||||
chromium_flash_detection=1
|
||||
html5_detection=0 #checks if the browser window is fullscreen; will disable the screensaver if the browser window is in fullscreen so it doesn't work correctly if you always use the browser (Firefox or Chromium) in fullscreen
|
||||
|
||||
|
||||
# YOU SHOULD NOT NEED TO MODIFY ANYTHING BELOW THIS LINE
|
||||
|
||||
|
||||
# enumerate all the attached screens
|
||||
displays=""
|
||||
while read id
|
||||
do
|
||||
displays="$displays $id"
|
||||
done< <(xvinfo | sed -n 's/^screen #\([0-9]\+\)$/\1/p')
|
||||
|
||||
# Detect screensaver been used (xscreensaver, kscreensaver, gnome-screensaver or none)
|
||||
if [ `pgrep -l xscreensaver | grep -wc xscreensaver` -ge 1 ];then
|
||||
screensaver=xscreensaver
|
||||
elif [ `pgrep -l gnome-screensav | grep -wc gnome-screensav` -ge 1 ];then
|
||||
screensaver=gnome-screensav
|
||||
elif [ `pgrep -l kscreensaver | grep -wc kscreensaver` -ge 1 ];then
|
||||
screensaver=kscreensaver
|
||||
else
|
||||
screensaver=None
|
||||
echo "No screensaver detected"
|
||||
fi
|
||||
|
||||
|
||||
checkFullscreen()
|
||||
{
|
||||
# loop through every display looking for a fullscreen window
|
||||
for display in $displays
|
||||
do
|
||||
#get id of active window and clean output
|
||||
activ_win_id=`DISPLAY=:0.${display} xprop -root _NET_ACTIVE_WINDOW`
|
||||
#activ_win_id=${activ_win_id#*# } #gives error if xprop returns extra ", 0x0" (happens on some distros)
|
||||
activ_win_id=${activ_win_id:40:9}
|
||||
|
||||
# Skip invalid window ids (commented as I could not reproduce a case
|
||||
# where invalid id was returned, plus if id invalid
|
||||
# isActivWinFullscreen will fail anyway.)
|
||||
#if [ "$activ_win_id" = "0x0" ]; then
|
||||
# continue
|
||||
#fi
|
||||
|
||||
# Check if Active Window (the foremost window) is in fullscreen state
|
||||
isActivWinFullscreen=`DISPLAY=:0.${display} xprop -id $activ_win_id | grep _NET_WM_STATE_FULLSCREEN`
|
||||
if [[ "$isActivWinFullscreen" = *NET_WM_STATE_FULLSCREEN* ]];then
|
||||
isAppRunning
|
||||
var=$?
|
||||
if [[ $var -eq 1 ]];then
|
||||
delayScreensaver
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# check if active windows is mplayer, vlc or firefox
|
||||
#TODO only window name in the variable activ_win_id, not whole line.
|
||||
#Then change IFs to detect more specifically the apps "<vlc>" and if process name exist
|
||||
|
||||
isAppRunning()
|
||||
{
|
||||
#Get title of active window
|
||||
activ_win_title=`xprop -id $activ_win_id | grep "WM_CLASS(STRING)"` # I used WM_NAME(STRING) before, WM_CLASS more accurate.
|
||||
|
||||
|
||||
|
||||
# Check if user want to detect Video fullscreen on Firefox, modify variable firefox_flash_detection if you dont want Firefox detection
|
||||
if [ $firefox_flash_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *unknown* || "$activ_win_title" = *plugin-container* ]];then
|
||||
# Check if plugin-container process is running
|
||||
flash_process=`pgrep -l plugin-containe | grep -wc plugin-containe`
|
||||
#(why was I using this line avobe? delete if pgrep -lc works ok)
|
||||
#flash_process=`pgrep -lc plugin-containe`
|
||||
if [[ $flash_process -ge 1 ]];then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Check if user want to detect Video fullscreen on Chromium, modify variable chromium_flash_detection if you dont want Chromium detection
|
||||
if [ $chromium_flash_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *exe* ]];then
|
||||
# Check if Chromium Flash process is running
|
||||
if [[ `pgrep -lfc "chromium-browser --type=plugin --plugin-path=/usr/lib/adobe-flashplugin"` -ge 1 || `pgrep -lfc "chromium-browser --type=plugin --plugin-path=/usr/lib/flashplugin-installer"` -ge 1 ]];then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#html5 (Firefox or Chromium full-screen)
|
||||
if [ $html5_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *chromium-browser* || "$activ_win_title" = *Firefox* ]];then
|
||||
#check if firefox or chromium is running.
|
||||
if [[ `pgrep -l firefox | grep -wc firefox` -ge 1 || `pgrep -l chromium-browse | grep -wc chromium-browse` -ge 1 ]]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#check if user want to detect mplayer fullscreen, modify variable mplayer_detection
|
||||
if [ $mplayer_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *mplayer* || "$activ_win_title" = *MPlayer* ]];then
|
||||
#check if mplayer is running.
|
||||
#mplayer_process=`pgrep -l mplayer | grep -wc mplayer`
|
||||
mplayer_process=`pgrep -lc mplayer`
|
||||
if [ $mplayer_process -ge 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Check if user want to detect vlc fullscreen, modify variable vlc_detection
|
||||
if [ $vlc_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *vlc* ]];then
|
||||
#check if vlc is running.
|
||||
#vlc_process=`pgrep -l vlc | grep -wc vlc`
|
||||
vlc_process=`pgrep -lc vlc`
|
||||
if [ $vlc_process -ge 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
delayScreensaver()
|
||||
{
|
||||
|
||||
# reset inactivity time counter so screensaver is not started
|
||||
if [ "$screensaver" == "xscreensaver" ]; then
|
||||
#This tells xscreensaver to pretend that there has just been user activity. This means that if the screensaver is active (the screen is blanked), then this command will cause the screen to un-blank as if there had been keyboard or mouse activity. If the screen is locked, then the password dialog will pop up first, as usual. If the screen is not blanked, then this simulated user activity will re-start the countdown (so, issuing the -deactivate command periodically is one way to prevent the screen from blanking.)
|
||||
xscreensaver-command -deactivate > /dev/null
|
||||
elif [ "$screensaver" == "gnome-screensav" ]; then
|
||||
dbus-send --session --type=method_call --dest=org.gnome.ScreenSaver --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.SimulateUserActivity > /dev/null
|
||||
elif [ "$screensaver" == "kscreensaver" ]; then
|
||||
qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity > /dev/null
|
||||
fi
|
||||
|
||||
|
||||
#Check if DPMS is on. If it is, deactivate and reactivate again. If it is not, do nothing.
|
||||
dpmsStatus=`xset -q | grep -ce 'DPMS is Enabled'`
|
||||
if [ $dpmsStatus == 1 ];then
|
||||
xset -dpms
|
||||
xset dpms
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
delay=$1
|
||||
|
||||
|
||||
# If argument empty, use 50 seconds as default.
|
||||
if [ -z "$1" ];then
|
||||
delay=50
|
||||
fi
|
||||
|
||||
|
||||
# If argument is not integer quit.
|
||||
if [[ $1 = *[^0-9]* ]]; then
|
||||
echo "The Argument \"$1\" is not valid, not an integer"
|
||||
echo "Please use the time in seconds you want the checks to repeat."
|
||||
echo "You want it to be ~10 seconds less than the time it takes your screensaver or DPMS to activate"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
while true
|
||||
do
|
||||
checkFullscreen
|
||||
sleep $delay
|
||||
done
|
||||
|
||||
|
||||
exit 0
|
||||
|
15
Laptop/backup_template.sh
Executable file
15
Laptop/backup_template.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
function backup(){
|
||||
|
||||
sourceDir=""
|
||||
backupDir=""
|
||||
export PASSPHRASE=sonypony
|
||||
duplicity ${sourceDir} file://${backupDir}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
1
Laptop/base_script.txt
Executable file
1
Laptop/base_script.txt
Executable file
@ -0,0 +1 @@
|
||||
#!/bin/bash
|
29
Laptop/blah
Executable file
29
Laptop/blah
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
#variables can have almost any name
|
||||
#you just can't have spaces or crazy special characters
|
||||
#To illustrate this I will make variables with stupid names
|
||||
|
||||
GIANTDICK="die bitch" #anything in double quotes will be treated as text
|
||||
NIGGERS="I hate niggers"
|
||||
|
||||
#now we can echo the variables
|
||||
#mind you that if the variables have no value, nothing will show up
|
||||
#thankfully we put racial slurs and cuss words in them
|
||||
|
||||
echo $GIANTDICK #notice the dollar sign, this is how you call a variable
|
||||
echo $NIGGERS
|
||||
|
||||
#you can use these variables anywhere in your script
|
||||
|
||||
echo "One day I woke up and I thought yo myself, ${NIGGERS}!"
|
||||
|
||||
#if you put curly braces around the name of the variable,
|
||||
#bash won't think that the explaimation point is part of the variable
|
||||
#I had this happen to me once because I didn't use curly braces.
|
||||
|
||||
#well that's pretty much it for variables
|
||||
#since I commented out the text of me explaining things, you can run this script and it will work
|
||||
|
||||
#Feel free to play around with it, but make sure you make a copy before you do so.
|
||||
# I hope this helps you bro!
|
3
Laptop/blockscheduler
Executable file
3
Laptop/blockscheduler
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
cat /sys/block/sda/queue/scheduler
|
||||
exit
|
727
Laptop/chill.sh
Executable file
727
Laptop/chill.sh
Executable file
@ -0,0 +1,727 @@
|
||||
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="">
|
||||
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#">
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Content-Language" content="en">
|
||||
|
||||
|
||||
<title>chill-script/chill.sh at master · silvernode/chill-script · GitHub</title>
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
|
||||
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-114.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-144.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144.png">
|
||||
<meta property="fb:app_id" content="1401488693436528">
|
||||
|
||||
<meta content="@github" name="twitter:site" /><meta content="summary" name="twitter:card" /><meta content="silvernode/chill-script" name="twitter:title" /><meta content="chill-script - Countdown to next bong hit" name="twitter:description" /><meta content="https://avatars1.githubusercontent.com/u/401972?v=3&s=400" name="twitter:image:src" />
|
||||
<meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="https://avatars1.githubusercontent.com/u/401972?v=3&s=400" property="og:image" /><meta content="silvernode/chill-script" property="og:title" /><meta content="https://github.com/silvernode/chill-script" property="og:url" /><meta content="chill-script - Countdown to next bong hit" property="og:description" />
|
||||
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
|
||||
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
|
||||
<link rel="assets" href="https://assets-cdn.github.com/">
|
||||
|
||||
<meta name="pjax-timeout" content="1000">
|
||||
|
||||
|
||||
<meta name="msapplication-TileImage" content="/windows-tile.png">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="selected-link" value="repo_source" data-pjax-transient>
|
||||
<meta name="google-analytics" content="UA-3769691-2">
|
||||
|
||||
<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="collector-cdn.github.com" name="octolytics-script-host" /><meta content="github" name="octolytics-app-id" /><meta content="467BB9D9:2CC1:9F2CC56:5557195F" name="octolytics-dimension-request_id" />
|
||||
|
||||
<meta content="Rails, view, blob#show" name="analytics-event" />
|
||||
<meta class="js-ga-set" name="dimension1" content="Logged Out">
|
||||
<meta class="js-ga-set" name="dimension2" content="Header v3">
|
||||
<meta name="is-dotcom" content="true">
|
||||
<meta name="hostname" content="github.com">
|
||||
<meta name="user-login" content="">
|
||||
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
|
||||
|
||||
|
||||
<meta content="authenticity_token" name="csrf-param" />
|
||||
<meta content="4e4WIndlmXenzyzroJAE+/PHiqUl5t2WDjtxLIfpDxFEiquZ3IRDpYzlfMKpWlJIpWU5wljG76SK4etEsZ//Gg==" name="csrf-token" />
|
||||
|
||||
<link href="https://assets-cdn.github.com/assets/github/index-d80e093fe7c48ff920ce83dfd2ad7c02806722220d164b49101ed783098ea618.css" media="all" rel="stylesheet" />
|
||||
<link href="https://assets-cdn.github.com/assets/github2/index-99a58ea750b0547d1266460cd4ade0c2c81ed8c524cbba4ea5e3b37e18daec79.css" media="all" rel="stylesheet" />
|
||||
|
||||
|
||||
|
||||
|
||||
<meta http-equiv="x-pjax-version" content="282d80bd51fc0e03270191711c02f726">
|
||||
|
||||
|
||||
<meta name="description" content="chill-script - Countdown to next bong hit">
|
||||
<meta name="go-import" content="github.com/silvernode/chill-script git https://github.com/silvernode/chill-script.git">
|
||||
|
||||
<meta content="401972" name="octolytics-dimension-user_id" /><meta content="silvernode" name="octolytics-dimension-user_login" /><meta content="35718958" name="octolytics-dimension-repository_id" /><meta content="silvernode/chill-script" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="false" name="octolytics-dimension-repository_is_fork" /><meta content="35718958" name="octolytics-dimension-repository_network_root_id" /><meta content="silvernode/chill-script" name="octolytics-dimension-repository_network_root_nwo" />
|
||||
<link href="https://github.com/silvernode/chill-script/commits/master.atom" rel="alternate" title="Recent Commits to chill-script:master" type="application/atom+xml">
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body class="logged_out env-production linux vis-public page-blob">
|
||||
<a href="#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a>
|
||||
<div class="wrapper">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="header header-logged-out" role="banner">
|
||||
<div class="container clearfix">
|
||||
|
||||
<a class="header-logo-wordmark" href="https://github.com/" data-ga-click="(Logged out) Header, go to homepage, icon:logo-wordmark">
|
||||
<span class="mega-octicon octicon-logo-github"></span>
|
||||
</a>
|
||||
|
||||
<div class="header-actions" role="navigation">
|
||||
<a class="btn btn-primary" href="/join" data-ga-click="(Logged out) Header, clicked Sign up, text:sign-up">Sign up</a>
|
||||
<a class="btn" href="/login?return_to=%2Fsilvernode%2Fchill-script%2Fblob%2Fmaster%2Fchill.sh" data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">Sign in</a>
|
||||
</div>
|
||||
|
||||
<div class="site-search repo-scope js-site-search" role="search">
|
||||
<form accept-charset="UTF-8" action="/silvernode/chill-script/search" class="js-site-search-form" data-global-search-url="/search" data-repo-search-url="/silvernode/chill-script/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
|
||||
<label class="js-chromeless-input-container form-control">
|
||||
<div class="scope-badge">This repository</div>
|
||||
<input type="text"
|
||||
class="js-site-search-focus js-site-search-field is-clearable chromeless-input"
|
||||
data-hotkey="s"
|
||||
name="q"
|
||||
placeholder="Search"
|
||||
data-global-scope-placeholder="Search GitHub"
|
||||
data-repo-scope-placeholder="Search"
|
||||
tabindex="1"
|
||||
autocapitalize="off">
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<ul class="header-nav left" role="navigation">
|
||||
<li class="header-nav-item">
|
||||
<a class="header-nav-link" href="/explore" data-ga-click="(Logged out) Header, go to explore, text:explore">Explore</a>
|
||||
</li>
|
||||
<li class="header-nav-item">
|
||||
<a class="header-nav-link" href="/features" data-ga-click="(Logged out) Header, go to features, text:features">Features</a>
|
||||
</li>
|
||||
<li class="header-nav-item">
|
||||
<a class="header-nav-link" href="https://enterprise.github.com/" data-ga-click="(Logged out) Header, go to enterprise, text:enterprise">Enterprise</a>
|
||||
</li>
|
||||
<li class="header-nav-item">
|
||||
<a class="header-nav-link" href="/blog" data-ga-click="(Logged out) Header, go to blog, text:blog">Blog</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="start-of-content" class="accessibility-aid"></div>
|
||||
<div class="site" itemscope itemtype="http://schema.org/WebPage">
|
||||
<div id="js-flash-container">
|
||||
|
||||
</div>
|
||||
<div class="pagehead repohead instapaper_ignore readability-menu">
|
||||
<div class="container">
|
||||
|
||||
<ul class="pagehead-actions">
|
||||
|
||||
<li>
|
||||
<a href="/login?return_to=%2Fsilvernode%2Fchill-script"
|
||||
class="btn btn-sm btn-with-count tooltipped tooltipped-n"
|
||||
aria-label="You must be signed in to watch a repository" rel="nofollow">
|
||||
<span class="octicon octicon-eye"></span>
|
||||
Watch
|
||||
</a>
|
||||
<a class="social-count" href="/silvernode/chill-script/watchers">
|
||||
1
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/login?return_to=%2Fsilvernode%2Fchill-script"
|
||||
class="btn btn-sm btn-with-count tooltipped tooltipped-n"
|
||||
aria-label="You must be signed in to star a repository" rel="nofollow">
|
||||
<span class="octicon octicon-star"></span>
|
||||
Star
|
||||
</a>
|
||||
|
||||
<a class="social-count js-social-count" href="/silvernode/chill-script/stargazers">
|
||||
0
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/login?return_to=%2Fsilvernode%2Fchill-script"
|
||||
class="btn btn-sm btn-with-count tooltipped tooltipped-n"
|
||||
aria-label="You must be signed in to fork a repository" rel="nofollow">
|
||||
<span class="octicon octicon-repo-forked"></span>
|
||||
Fork
|
||||
</a>
|
||||
<a href="/silvernode/chill-script/network" class="social-count">
|
||||
0
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h1 itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="entry-title public">
|
||||
<span class="mega-octicon octicon-repo"></span>
|
||||
<span class="author"><a href="/silvernode" class="url fn" itemprop="url" rel="author"><span itemprop="title">silvernode</span></a></span><!--
|
||||
--><span class="path-divider">/</span><!--
|
||||
--><strong><a href="/silvernode/chill-script" class="js-current-repository" data-pjax="#js-repo-pjax-container">chill-script</a></strong>
|
||||
|
||||
<span class="page-context-loader">
|
||||
<img alt="" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
|
||||
</span>
|
||||
|
||||
</h1>
|
||||
</div><!-- /.container -->
|
||||
</div><!-- /.repohead -->
|
||||
|
||||
<div class="container">
|
||||
<div class="repository-with-sidebar repo-container new-discussion-timeline ">
|
||||
<div class="repository-sidebar clearfix">
|
||||
|
||||
<nav class="sunken-menu repo-nav js-repo-nav js-sidenav-container-pjax js-octicon-loaders"
|
||||
role="navigation"
|
||||
data-pjax="#js-repo-pjax-container"
|
||||
data-issue-count-url="/silvernode/chill-script/issues/counts">
|
||||
<ul class="sunken-menu-group">
|
||||
<li class="tooltipped tooltipped-w" aria-label="Code">
|
||||
<a href="/silvernode/chill-script" aria-label="Code" class="selected js-selected-navigation-item sunken-menu-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /silvernode/chill-script">
|
||||
<span class="octicon octicon-code"></span> <span class="full-word">Code</span>
|
||||
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
|
||||
</a> </li>
|
||||
|
||||
<li class="tooltipped tooltipped-w" aria-label="Issues">
|
||||
<a href="/silvernode/chill-script/issues" aria-label="Issues" class="js-selected-navigation-item sunken-menu-item" data-hotkey="g i" data-selected-links="repo_issues repo_labels repo_milestones /silvernode/chill-script/issues">
|
||||
<span class="octicon octicon-issue-opened"></span> <span class="full-word">Issues</span>
|
||||
<span class="js-issue-replace-counter"></span>
|
||||
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
|
||||
</a> </li>
|
||||
|
||||
<li class="tooltipped tooltipped-w" aria-label="Pull requests">
|
||||
<a href="/silvernode/chill-script/pulls" aria-label="Pull requests" class="js-selected-navigation-item sunken-menu-item" data-hotkey="g p" data-selected-links="repo_pulls /silvernode/chill-script/pulls">
|
||||
<span class="octicon octicon-git-pull-request"></span> <span class="full-word">Pull requests</span>
|
||||
<span class="js-pull-replace-counter"></span>
|
||||
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
|
||||
</a> </li>
|
||||
|
||||
</ul>
|
||||
<div class="sunken-menu-separator"></div>
|
||||
<ul class="sunken-menu-group">
|
||||
|
||||
<li class="tooltipped tooltipped-w" aria-label="Pulse">
|
||||
<a href="/silvernode/chill-script/pulse" aria-label="Pulse" class="js-selected-navigation-item sunken-menu-item" data-selected-links="pulse /silvernode/chill-script/pulse">
|
||||
<span class="octicon octicon-pulse"></span> <span class="full-word">Pulse</span>
|
||||
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
|
||||
</a> </li>
|
||||
|
||||
<li class="tooltipped tooltipped-w" aria-label="Graphs">
|
||||
<a href="/silvernode/chill-script/graphs" aria-label="Graphs" class="js-selected-navigation-item sunken-menu-item" data-selected-links="repo_graphs repo_contributors /silvernode/chill-script/graphs">
|
||||
<span class="octicon octicon-graph"></span> <span class="full-word">Graphs</span>
|
||||
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
|
||||
</a> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
<div class="only-with-full-nav">
|
||||
|
||||
<div class="clone-url open"
|
||||
data-protocol-type="http"
|
||||
data-url="/users/set_protocol?protocol_selector=http&protocol_type=clone">
|
||||
<h3><span class="text-emphasized">HTTPS</span> clone URL</h3>
|
||||
<div class="input-group js-zeroclipboard-container">
|
||||
<input type="text" class="input-mini input-monospace js-url-field js-zeroclipboard-target"
|
||||
value="https://github.com/silvernode/chill-script.git" readonly="readonly">
|
||||
<span class="input-group-button">
|
||||
<button aria-label="Copy to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="clone-url "
|
||||
data-protocol-type="subversion"
|
||||
data-url="/users/set_protocol?protocol_selector=subversion&protocol_type=clone">
|
||||
<h3><span class="text-emphasized">Subversion</span> checkout URL</h3>
|
||||
<div class="input-group js-zeroclipboard-container">
|
||||
<input type="text" class="input-mini input-monospace js-url-field js-zeroclipboard-target"
|
||||
value="https://github.com/silvernode/chill-script" readonly="readonly">
|
||||
<span class="input-group-button">
|
||||
<button aria-label="Copy to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p class="clone-options">You can clone with
|
||||
<a href="#" class="js-clone-selector" data-protocol="http">HTTPS</a> or <a href="#" class="js-clone-selector" data-protocol="subversion">Subversion</a>.
|
||||
<a href="https://help.github.com/articles/which-remote-url-should-i-use" class="help tooltipped tooltipped-n" aria-label="Get help on which URL is right for you.">
|
||||
<span class="octicon octicon-question"></span>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="/silvernode/chill-script/archive/master.zip"
|
||||
class="btn btn-sm sidebar-button"
|
||||
aria-label="Download the contents of silvernode/chill-script as a zip file"
|
||||
title="Download the contents of silvernode/chill-script as a zip file"
|
||||
rel="nofollow">
|
||||
<span class="octicon octicon-cloud-download"></span>
|
||||
Download ZIP
|
||||
</a>
|
||||
</div>
|
||||
</div><!-- /.repository-sidebar -->
|
||||
|
||||
<div id="js-repo-pjax-container" class="repository-content context-loader-container" data-pjax-container>
|
||||
|
||||
|
||||
|
||||
<a href="/silvernode/chill-script/blob/82a820324d12536a7f99a9824fae8f39be17d605/chill.sh" class="hidden js-permalink-shortcut" data-hotkey="y">Permalink</a>
|
||||
|
||||
<!-- blob contrib key: blob_contributors:v21:c04aea16ef6ec019bee6c3ed148bca60 -->
|
||||
|
||||
<div class="file-navigation js-zeroclipboard-container">
|
||||
|
||||
<div class="select-menu js-menu-container js-select-menu left">
|
||||
<span class="btn btn-sm select-menu-button js-menu-target css-truncate" data-hotkey="w"
|
||||
data-master-branch="master"
|
||||
data-ref="master"
|
||||
title="master"
|
||||
role="button" aria-label="Switch branches or tags" tabindex="0" aria-haspopup="true">
|
||||
<span class="octicon octicon-git-branch"></span>
|
||||
<i>branch:</i>
|
||||
<span class="js-select-button css-truncate-target">master</span>
|
||||
</span>
|
||||
|
||||
<div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax aria-hidden="true">
|
||||
|
||||
<div class="select-menu-modal">
|
||||
<div class="select-menu-header">
|
||||
<span class="select-menu-title">Switch branches/tags</span>
|
||||
<span class="octicon octicon-x js-menu-close" role="button" aria-label="Close"></span>
|
||||
</div>
|
||||
|
||||
<div class="select-menu-filters">
|
||||
<div class="select-menu-text-filter">
|
||||
<input type="text" aria-label="Filter branches/tags" id="context-commitish-filter-field" class="js-filterable-field js-navigation-enable" placeholder="Filter branches/tags">
|
||||
</div>
|
||||
<div class="select-menu-tabs">
|
||||
<ul>
|
||||
<li class="select-menu-tab">
|
||||
<a href="#" data-tab-filter="branches" data-filter-placeholder="Filter branches/tags" class="js-select-menu-tab">Branches</a>
|
||||
</li>
|
||||
<li class="select-menu-tab">
|
||||
<a href="#" data-tab-filter="tags" data-filter-placeholder="Find a tag…" class="js-select-menu-tab">Tags</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches">
|
||||
|
||||
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
|
||||
|
||||
|
||||
<a class="select-menu-item js-navigation-item js-navigation-open selected"
|
||||
href="/silvernode/chill-script/blob/master/chill.sh"
|
||||
data-name="master"
|
||||
data-skip-pjax="true"
|
||||
rel="nofollow">
|
||||
<span class="select-menu-item-icon octicon octicon-check"></span>
|
||||
<span class="select-menu-item-text css-truncate-target" title="master">
|
||||
master
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="select-menu-no-results">Nothing to show</div>
|
||||
</div>
|
||||
|
||||
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags">
|
||||
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="select-menu-no-results">Nothing to show</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group right">
|
||||
<a href="/silvernode/chill-script/find/master"
|
||||
class="js-show-file-finder btn btn-sm empty-icon tooltipped tooltipped-s"
|
||||
data-pjax
|
||||
data-hotkey="t"
|
||||
aria-label="Quickly jump between files">
|
||||
<span class="octicon octicon-list-unordered"></span>
|
||||
</a>
|
||||
<button aria-label="Copy file path to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="breadcrumb js-zeroclipboard-target">
|
||||
<span class='repo-root js-repo-root'><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/silvernode/chill-script" class="" data-branch="master" data-direction="back" data-pjax="true" itemscope="url"><span itemprop="title">chill-script</span></a></span></span><span class="separator">/</span><strong class="final-path">chill.sh</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="commit file-history-tease">
|
||||
<div class="file-history-tease-header">
|
||||
<img alt="@silvernode" class="avatar" data-user="401972" height="24" src="https://avatars3.githubusercontent.com/u/401972?v=3&s=48" width="24" />
|
||||
<span class="author"><a href="/silvernode" rel="author">silvernode</a></span>
|
||||
<time datetime="2015-05-16T10:12:46Z" is="relative-time">May 16, 2015</time>
|
||||
<div class="commit-title">
|
||||
<a href="/silvernode/chill-script/commit/82a820324d12536a7f99a9824fae8f39be17d605" class="message" data-pjax="true" title="first commit">first commit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="participation">
|
||||
<p class="quickstat">
|
||||
<a href="#blob_contributors_box" rel="facebox">
|
||||
<strong>1</strong>
|
||||
contributor
|
||||
</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div id="blob_contributors_box" style="display:none">
|
||||
<h2 class="facebox-header">Users who have contributed to this file</h2>
|
||||
<ul class="facebox-user-list">
|
||||
<li class="facebox-user-list-item">
|
||||
<img alt="@silvernode" data-user="401972" height="24" src="https://avatars3.githubusercontent.com/u/401972?v=3&s=48" width="24" />
|
||||
<a href="/silvernode">silvernode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="file">
|
||||
<div class="file-header">
|
||||
<div class="file-actions">
|
||||
|
||||
<div class="btn-group">
|
||||
<a href="/silvernode/chill-script/raw/master/chill.sh" class="btn btn-sm " id="raw-url">Raw</a>
|
||||
<a href="/silvernode/chill-script/blame/master/chill.sh" class="btn btn-sm js-update-url-with-hash">Blame</a>
|
||||
<a href="/silvernode/chill-script/commits/master/chill.sh" class="btn btn-sm " rel="nofollow">History</a>
|
||||
</div>
|
||||
|
||||
|
||||
<button type="button" class="octicon-btn disabled tooltipped tooltipped-n" aria-label="You must be signed in to make or propose changes">
|
||||
<span class="octicon octicon-pencil"></span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="octicon-btn octicon-btn-danger disabled tooltipped tooltipped-n" aria-label="You must be signed in to make or propose changes">
|
||||
<span class="octicon octicon-trashcan"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="file-info">
|
||||
<span class="file-mode" title="File mode">executable file</span>
|
||||
<span class="file-info-divider"></span>
|
||||
46 lines (33 sloc)
|
||||
<span class="file-info-divider"></span>
|
||||
0.59 kb
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="blob-wrapper data type-shell">
|
||||
<table class="highlight tab-size-8 js-file-line-container">
|
||||
<tr>
|
||||
<td id="L1" class="blob-num js-line-number" data-line-number="1"></td>
|
||||
<td id="LC1" class="blob-code blob-code-inner js-file-line"><span class="pl-c">#!/bin/bash</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L2" class="blob-num js-line-number" data-line-number="2"></td>
|
||||
<td id="LC2" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L3" class="blob-num js-line-number" data-line-number="3"></td>
|
||||
<td id="LC3" class="blob-code blob-code-inner js-file-line">CHILLTIME=1 <span class="pl-c"># Minutes between bong hits</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L4" class="blob-num js-line-number" data-line-number="4"></td>
|
||||
<td id="LC4" class="blob-code blob-code-inner js-file-line">BONGTIME=1 <span class="pl-c"># Minutes during bong hits</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L5" class="blob-num js-line-number" data-line-number="5"></td>
|
||||
<td id="LC5" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L6" class="blob-num js-line-number" data-line-number="6"></td>
|
||||
<td id="LC6" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L7" class="blob-num js-line-number" data-line-number="7"></td>
|
||||
<td id="LC7" class="blob-code blob-code-inner js-file-line"><span class="pl-en">chillCount</span>(){</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L8" class="blob-num js-line-number" data-line-number="8"></td>
|
||||
<td id="LC8" class="blob-code blob-code-inner js-file-line"> clear</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L9" class="blob-num js-line-number" data-line-number="9"></td>
|
||||
<td id="LC9" class="blob-code blob-code-inner js-file-line"> secs=<span class="pl-s"><span class="pl-pds">$((</span> <span class="pl-smi">${CHILLTIME}</span> <span class="pl-k">*</span> <span class="pl-c1">60</span><span class="pl-pds">))</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L10" class="blob-num js-line-number" data-line-number="10"></td>
|
||||
<td id="LC10" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">echo</span> <span class="pl-s"><span class="pl-pds">"</span>(-_-)<span class="pl-pds">"</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L11" class="blob-num js-line-number" data-line-number="11"></td>
|
||||
<td id="LC11" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">echo</span> <span class="pl-s"><span class="pl-pds">"</span>Seconds until next bong hit<span class="pl-pds">"</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L12" class="blob-num js-line-number" data-line-number="12"></td>
|
||||
<td id="LC12" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">while</span> [ <span class="pl-smi">$secs</span> -gt 0 ]<span class="pl-k">;</span> <span class="pl-k">do</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L13" class="blob-num js-line-number" data-line-number="13"></td>
|
||||
<td id="LC13" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L14" class="blob-num js-line-number" data-line-number="14"></td>
|
||||
<td id="LC14" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">echo</span> -ne <span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">$secs</span>\033[0K\r<span class="pl-pds">"</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L15" class="blob-num js-line-number" data-line-number="15"></td>
|
||||
<td id="LC15" class="blob-code blob-code-inner js-file-line"> sleep 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L16" class="blob-num js-line-number" data-line-number="16"></td>
|
||||
<td id="LC16" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">:</span> <span class="pl-s"><span class="pl-pds">$((</span>secs<span class="pl-k">--</span><span class="pl-pds">))</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L17" class="blob-num js-line-number" data-line-number="17"></td>
|
||||
<td id="LC17" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">done</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L18" class="blob-num js-line-number" data-line-number="18"></td>
|
||||
<td id="LC18" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L19" class="blob-num js-line-number" data-line-number="19"></td>
|
||||
<td id="LC19" class="blob-code blob-code-inner js-file-line">}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L20" class="blob-num js-line-number" data-line-number="20"></td>
|
||||
<td id="LC20" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L21" class="blob-num js-line-number" data-line-number="21"></td>
|
||||
<td id="LC21" class="blob-code blob-code-inner js-file-line"><span class="pl-en">bongCount</span>(){</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L22" class="blob-num js-line-number" data-line-number="22"></td>
|
||||
<td id="LC22" class="blob-code blob-code-inner js-file-line"> clear</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L23" class="blob-num js-line-number" data-line-number="23"></td>
|
||||
<td id="LC23" class="blob-code blob-code-inner js-file-line"> secs=<span class="pl-s"><span class="pl-pds">$((</span> <span class="pl-smi">${BONGTIME}</span> <span class="pl-k">*</span> <span class="pl-c1">60</span><span class="pl-pds">))</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L24" class="blob-num js-line-number" data-line-number="24"></td>
|
||||
<td id="LC24" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">echo</span> <span class="pl-s"><span class="pl-pds">"</span>(-_-)<span class="pl-pds">"</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L25" class="blob-num js-line-number" data-line-number="25"></td>
|
||||
<td id="LC25" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L26" class="blob-num js-line-number" data-line-number="26"></td>
|
||||
<td id="LC26" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">echo</span> <span class="pl-s"><span class="pl-pds">"</span>Seconds until next chill period<span class="pl-pds">"</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L27" class="blob-num js-line-number" data-line-number="27"></td>
|
||||
<td id="LC27" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">while</span> [ <span class="pl-smi">$secs</span> -gt 0 ]<span class="pl-k">;</span> <span class="pl-k">do</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L28" class="blob-num js-line-number" data-line-number="28"></td>
|
||||
<td id="LC28" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L29" class="blob-num js-line-number" data-line-number="29"></td>
|
||||
<td id="LC29" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">echo</span> -ne <span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">$secs</span>\033[0K\r<span class="pl-pds">"</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L30" class="blob-num js-line-number" data-line-number="30"></td>
|
||||
<td id="LC30" class="blob-code blob-code-inner js-file-line"> sleep 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L31" class="blob-num js-line-number" data-line-number="31"></td>
|
||||
<td id="LC31" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">:</span> <span class="pl-s"><span class="pl-pds">$((</span>secs<span class="pl-k">--</span><span class="pl-pds">))</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L32" class="blob-num js-line-number" data-line-number="32"></td>
|
||||
<td id="LC32" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">done</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L33" class="blob-num js-line-number" data-line-number="33"></td>
|
||||
<td id="LC33" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L34" class="blob-num js-line-number" data-line-number="34"></td>
|
||||
<td id="LC34" class="blob-code blob-code-inner js-file-line">}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L35" class="blob-num js-line-number" data-line-number="35"></td>
|
||||
<td id="LC35" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L36" class="blob-num js-line-number" data-line-number="36"></td>
|
||||
<td id="LC36" class="blob-code blob-code-inner js-file-line"><span class="pl-en">main</span>(){</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L37" class="blob-num js-line-number" data-line-number="37"></td>
|
||||
<td id="LC37" class="blob-code blob-code-inner js-file-line"> clear</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L38" class="blob-num js-line-number" data-line-number="38"></td>
|
||||
<td id="LC38" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">while</span> <span class="pl-c1">true</span><span class="pl-k">;</span><span class="pl-k">do</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L39" class="blob-num js-line-number" data-line-number="39"></td>
|
||||
<td id="LC39" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L40" class="blob-num js-line-number" data-line-number="40"></td>
|
||||
<td id="LC40" class="blob-code blob-code-inner js-file-line"> chillCount</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L41" class="blob-num js-line-number" data-line-number="41"></td>
|
||||
<td id="LC41" class="blob-code blob-code-inner js-file-line"> bongCount</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L42" class="blob-num js-line-number" data-line-number="42"></td>
|
||||
<td id="LC42" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">done</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L43" class="blob-num js-line-number" data-line-number="43"></td>
|
||||
<td id="LC43" class="blob-code blob-code-inner js-file-line">}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L44" class="blob-num js-line-number" data-line-number="44"></td>
|
||||
<td id="LC44" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L45" class="blob-num js-line-number" data-line-number="45"></td>
|
||||
<td id="LC45" class="blob-code blob-code-inner js-file-line">main</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<a href="#jump-to-line" rel="facebox[.linejump]" data-hotkey="l" style="display:none">Jump to Line</a>
|
||||
<div id="jump-to-line" style="display:none">
|
||||
<form accept-charset="UTF-8" action="" class="js-jump-to-line-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
|
||||
<input class="linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line…" autofocus>
|
||||
<button type="submit" class="btn">Go</button>
|
||||
</form></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div><!-- /.repo-container -->
|
||||
<div class="modal-backdrop"></div>
|
||||
</div><!-- /.container -->
|
||||
</div><!-- /.site -->
|
||||
|
||||
|
||||
</div><!-- /.wrapper -->
|
||||
|
||||
<div class="container">
|
||||
<div class="site-footer" role="contentinfo">
|
||||
<ul class="site-footer-links right">
|
||||
<li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
|
||||
<li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
|
||||
<li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
|
||||
<li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
|
||||
<li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
|
||||
<li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<a href="https://github.com" aria-label="Homepage">
|
||||
<span class="mega-octicon octicon-mark-github" title="GitHub"></span>
|
||||
</a>
|
||||
<ul class="site-footer-links">
|
||||
<li>© 2015 <span title="0.03598s from github-fe128-cp1-prd.iad.github.net">GitHub</span>, Inc.</li>
|
||||
<li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
|
||||
<li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
|
||||
<li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
|
||||
<li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="fullscreen-overlay js-fullscreen-overlay" id="fullscreen_overlay">
|
||||
<div class="fullscreen-container js-suggester-container">
|
||||
<div class="textarea-wrap">
|
||||
<textarea name="fullscreen-contents" id="fullscreen-contents" class="fullscreen-contents js-fullscreen-contents" placeholder=""></textarea>
|
||||
<div class="suggester-container">
|
||||
<div class="suggester fullscreen-suggester js-suggester js-navigation-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fullscreen-sidebar">
|
||||
<a href="#" class="exit-fullscreen js-exit-fullscreen tooltipped tooltipped-w" aria-label="Exit Zen Mode">
|
||||
<span class="mega-octicon octicon-screen-normal"></span>
|
||||
</a>
|
||||
<a href="#" class="theme-switcher js-theme-switcher tooltipped tooltipped-w"
|
||||
aria-label="Switch themes">
|
||||
<span class="octicon octicon-color-mode"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ajax-error-message" class="flash flash-error">
|
||||
<span class="octicon octicon-alert"></span>
|
||||
<a href="#" class="octicon octicon-x flash-close js-ajax-error-dismiss" aria-label="Dismiss error"></a>
|
||||
Something went wrong with that request. Please try again.
|
||||
</div>
|
||||
|
||||
|
||||
<script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/frameworks-5c08de317e4054ec200d36d3b1361ddd3cb30c05c9070a9d72862ee28ab1d7f9.js"></script>
|
||||
<script async="async" crossorigin="anonymous" src="https://assets-cdn.github.com/assets/github/index-b79817a43c4618022b9ecd18dadd96010ccecbb12b56fcc232664db1f897e3a8.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
8
Laptop/cleankernels
Executable file
8
Laptop/cleankernels
Executable file
@ -0,0 +1,8 @@
|
||||
#/bin/bash
|
||||
ls /boot/ | grep vmlinuz | sed 's@vmlinuz-@linux-image-@g' | grep -v `uname -r` > /tmp/kernelList
|
||||
for I in `cat /tmp/kernelList`
|
||||
do
|
||||
aptitude remove $I
|
||||
done
|
||||
rm -f /tmp/kernelList
|
||||
update-grub
|
86
Laptop/cpu_set_speed.sh
Executable file
86
Laptop/cpu_set_speed.sh
Executable file
@ -0,0 +1,86 @@
|
||||
#!/bin/bash
|
||||
function main_menu
|
||||
{
|
||||
sudo clear
|
||||
cursetting=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
|
||||
getspd=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq)
|
||||
curspd=$(echo $getspd 1000000 | awk '{printf $1 / $2}')
|
||||
echo ""
|
||||
echo ""
|
||||
echo "-----------------CPU Settings---------------------"
|
||||
echo "1. Allow software to set CPU speed (UserSpace) setting."
|
||||
echo "2. Set CPU to Minimum (Powersave) setting."
|
||||
echo "3. Set CPU to Low (Conservative) setting."
|
||||
echo "4. Set CPU to Medium (OnDemand) setting."
|
||||
echo "5. Set CPU to High (Performance) setting."
|
||||
echo "6. View CPUID info string."
|
||||
echo "7. View Temperature sensor info string."
|
||||
echo "8. Exit."
|
||||
echo "--------------------------------------------------"
|
||||
echo " Current CPU Setting - "$cursetting;
|
||||
echo " Current CPU Speed - "$curspd"GHz";
|
||||
choice=9
|
||||
echo ""
|
||||
echo -e "Please enter your choice: \c"
|
||||
}
|
||||
|
||||
function press_enter
|
||||
{
|
||||
echo ""
|
||||
echo -n "Press Enter to continue."
|
||||
read
|
||||
main_menu
|
||||
}
|
||||
|
||||
main_menu
|
||||
while [ $choice -eq 9 ]; do
|
||||
read choice
|
||||
|
||||
if [ $choice -eq 1 ]; then
|
||||
echo userspace | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
|
||||
main_menu
|
||||
else
|
||||
if [ $choice -eq 2 ]; then
|
||||
echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
|
||||
main_menu
|
||||
else
|
||||
if [ $choice -eq 3 ]; then
|
||||
echo conservative | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
|
||||
main_menu
|
||||
else
|
||||
if [ $choice -eq 4 ]; then
|
||||
echo ondemand | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
|
||||
main_menu
|
||||
else
|
||||
if [ $choice -eq 5 ]; then
|
||||
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
|
||||
main_menu
|
||||
else
|
||||
if [ $choice -eq 6 ]; then
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
cpuid;
|
||||
press_enter
|
||||
else
|
||||
if [ $choice -eq 7 ]; then
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
sensors;
|
||||
press_enter
|
||||
else
|
||||
if [ $choice -eq 8 ]; then
|
||||
exit;
|
||||
else
|
||||
echo -e "Please enter the NUMBER of your choice: \c"
|
||||
choice=9
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
4
Laptop/desktop_icon_pos.sh
Executable file
4
Laptop/desktop_icon_pos.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#! /bin/sh
|
||||
chattr +i ~/.config/xfce4/desktop/icons*
|
||||
sleep 40
|
||||
chattr -i ~/.config/xfce4/desktop/icons*
|
30
Laptop/dogecoin-update-script.sh
Executable file
30
Laptop/dogecoin-update-script.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
echo "Installing Dependencies"
|
||||
|
||||
sudo apt-get -y install libssl-dev libdb-dev libdb++-dev libqrencode-dev qt4-qmake libqtgui4 libqt4-dev libminiupnpc-dev libminiupnpc8 libboost1.53-all-dev build-essential git
|
||||
|
||||
cd /tmp
|
||||
|
||||
git clone https://github.com/dogecoin/dogecoin.git
|
||||
|
||||
cd dogecoin
|
||||
|
||||
sed -i 's/-mgw46-mt-sd-1_53//g' dogecoin-qt.pro
|
||||
|
||||
qmake USE_UPNP=- USE_QRCODE=0 USE_IPV6=0
|
||||
|
||||
make -j5
|
||||
|
||||
sudo install -Dm644 src/qt/res/icons/bitcoin.png /usr/share/pixmaps/dogecoin.png
|
||||
sudo install -Dm755 dogecoin-qt /usr/bin
|
||||
|
||||
wget http://scripts.homebutter.com/dogecoin.desktop
|
||||
|
||||
sudo install -Dm644 dogecoin.desktop /usr/share/applications/dogecoin.desktop
|
||||
|
||||
cd
|
||||
|
||||
sudo rm -r /tmp/dogecoin
|
||||
|
43
Laptop/flash_fix
Executable file
43
Laptop/flash_fix
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
sudo apt-get install devilspie
|
||||
|
||||
mkdir -p ~/.devilspie
|
||||
|
||||
echo '(if
|
||||
(or
|
||||
(is (application_name) "plugin-container")
|
||||
(and
|
||||
(contains application_name) "chromium-browser")
|
||||
(contains application_name) "flash-plugin")
|
||||
)
|
||||
)
|
||||
(begin
|
||||
(focus)
|
||||
)
|
||||
)' > ~/.devilspie/flash_fullscreen.ds
|
||||
|
||||
echo '#!/bin/bash
|
||||
|
||||
echo "running" > /home/maarten/devilspie.log
|
||||
|
||||
while [ true ]; do
|
||||
/usr/bin/devilspie;
|
||||
done' > ~/.devilspie/devilspie_daemon.sh
|
||||
|
||||
chmod a+x ~/.devilspie/devilspie_daemon.sh
|
||||
|
||||
mkdir -p ~/.config/autostart
|
||||
|
||||
echo '[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=/home/maarten/.devilspie/devilspie_daemon.sh
|
||||
Hidden=false
|
||||
X-GNOME-Autostart-enabled=true
|
||||
Name[en_US]=Devilspie Daemon
|
||||
Name=Devilspie Daemon
|
||||
Comment[en_US]=Script will continuously restart devilspie if stopped
|
||||
Comment=Script will continuously restart devilspie if stopped
|
||||
' > ~/.config/autostart/devilspie_daemon.desktop
|
13
Laptop/give_mem
Executable file
13
Laptop/give_mem
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# Free unused memory
|
||||
|
||||
flush_mem () {
|
||||
sudo sync
|
||||
echo 3 | sudo tee /proc/sys/vm/drop_caches
|
||||
}
|
||||
|
||||
echo -e "\nMemory usage before purge:\n" && free -m
|
||||
|
||||
flush_mem || exit && echo " Error purging memory"
|
||||
|
||||
echo -e "\nMemory usage after purge:\n" && free -m
|
3
Laptop/icon_pos_save
Normal file
3
Laptop/icon_pos_save
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
mkdir -p ~/.config/xfce4/desktop.bak
|
||||
cp -f ~/.config/xfce4/desktop/icons* ~/.config/xfce4/desktop.bak
|
106
Laptop/idd.sh
Executable file
106
Laptop/idd.sh
Executable file
@ -0,0 +1,106 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Paths
|
||||
MOUNTPATH="/mnt/mediadrive"
|
||||
DEVICEDIR="/dev"
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
LRED="\033[1;31m"
|
||||
BLUE="\033[0;34m"
|
||||
LBLUE="\033[1;34m"
|
||||
GREEN="\033[0;32m"
|
||||
LGREEN="\033[1;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
CYAN="\033[0;36m"
|
||||
LCYAN="\033[1;36m"
|
||||
PURPLE="\033[0;35m"
|
||||
LPURPLE="\033[1;35m"
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
printf "${LRED}This script must be run as root${NC}\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
|
||||
-d) if [ -f /usr/bin/pv ];then
|
||||
clear
|
||||
|
||||
printf "${LCYAN}idd - interactive dd${NC}\n"
|
||||
printf "${LPURPLE}********************************${NC}\n"
|
||||
echo
|
||||
printf "${LGREEN}Image files (img, iso) in ${2}${NC}\n"
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
|
||||
find $2 -regex ".*\.\(img\|iso\)" | grep [.iso,.img]
|
||||
if [ ! $? = 0 ];then
|
||||
printf "${LRED}No image files found${NC}\n"
|
||||
fi
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
|
||||
printf "${YELLOW}Copy & paste full file path here: ${NC}"
|
||||
read filepath
|
||||
|
||||
clear
|
||||
printf "${LGREEN}List of DEVICES in ${DEVICEDIR}/${NC}\n"
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
lsblk
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
echo
|
||||
printf "${YELLOW}Enter name of device${NC} (${LCYAN}example${NC}, ${LBLUE}sdb${NC}): "
|
||||
read devname
|
||||
|
||||
echo
|
||||
|
||||
printf "${YELLOW}Writing${NC} ${LGREEN}${filepath}${NC} to ${LGREEN}/dev/${devname}${NC}\n"
|
||||
printf "${LCYAN}Please wait ...${NC}\n"
|
||||
echo
|
||||
dd if=${filepath} | pv | dd of=${DEVICEDIR}/${devname};sync
|
||||
printf "${LGREEN}Done writing file${NC}\n"
|
||||
else
|
||||
echo "${0}: Please install 'pv' with your package manager"
|
||||
fi
|
||||
;;
|
||||
|
||||
*) if [ -f /usr/bin/pv ];then
|
||||
clear
|
||||
|
||||
printf "${LCYAN}idd - interactive dd${NC}\n"
|
||||
printf "${LPURPLE}********************************${NC}\n"
|
||||
echo
|
||||
printf "${LGREEN}Image files (img, iso) in ${HOME}${NC}\n"
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
|
||||
find ${HOME} -regex ".*\.\(img\|iso\)" | grep [.iso,.img]
|
||||
if [ ! $? = 0 ];then
|
||||
printf "${LRED}No image files found${NC}\n"
|
||||
fi
|
||||
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
|
||||
printf "${YELLOW}Copy & paste full file path here: ${NC}"
|
||||
read filepath
|
||||
|
||||
clear
|
||||
printf "${LGREEN}List of DEVICES in ${DEVICEDIR}/${NC}\n"
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
lsblk
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
echo
|
||||
printf "${YELLOW}Enter name of device${NC} (${LCYAN}example${NC}, ${LBLUE}sdb${NC}): "
|
||||
read devname
|
||||
|
||||
echo
|
||||
|
||||
printf "${YELLOW}Writing${NC} ${LGREEN}${filepath}${NC} to ${LGREEN}/dev/${devname}${NC}\n"
|
||||
printf "${LCYAN}Please wait ...${NC}\n"
|
||||
echo
|
||||
dd if=${filepath} | pv | dd of=${DEVICEDIR}/${devname};sync
|
||||
printf "${LGREEN}Done writing file${NC}\n"
|
||||
else
|
||||
echo "${0}: pv command not found in /usr/bin"
|
||||
fi
|
||||
;;
|
||||
esac
|
7
Laptop/ip
Executable file
7
Laptop/ip
Executable file
@ -0,0 +1,7 @@
|
||||
echo Public IP
|
||||
curl -s icanhazip.com
|
||||
echo
|
||||
echo Local IP
|
||||
/sbin/ifconfig enp5s0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'
|
||||
|
||||
|
5
Laptop/ip.bak
Executable file
5
Laptop/ip.bak
Executable file
@ -0,0 +1,5 @@
|
||||
echo Public IP-
|
||||
curl -s icanhazip.com
|
||||
echo
|
||||
echo Local IP-
|
||||
ifconfig | grep "inet" | grep "broadcast" | awk '{print $2}'
|
7
Laptop/ip.sh
Executable file
7
Laptop/ip.sh
Executable file
@ -0,0 +1,7 @@
|
||||
echo Public IP
|
||||
dig +short myip.opendns.com @resolver1.opendns.com
|
||||
echo
|
||||
echo Local IP
|
||||
/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'
|
||||
|
||||
|
1
Laptop/kill_chrome
Executable file
1
Laptop/kill_chrome
Executable file
@ -0,0 +1 @@
|
||||
sudo killall chromium-browser
|
4
Laptop/kill_kodi
Executable file
4
Laptop/kill_kodi
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
killall kodi.bin
|
||||
#ps aux | grep -i kodi | awk '{print $2}' | xargs sudo kill -9
|
||||
|
1
Laptop/killx
Executable file
1
Laptop/killx
Executable file
@ -0,0 +1 @@
|
||||
sudo killall X
|
2
Laptop/lightdmresolutionfix.sh
Executable file
2
Laptop/lightdmresolutionfix.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
xrandr --output HDMI1 --primary --mode 1920x1080
|
217
Laptop/lightson
Executable file
217
Laptop/lightson
Executable file
@ -0,0 +1,217 @@
|
||||
#!/bin/bash
|
||||
# lightsOn.sh
|
||||
|
||||
# Copyright (c) 2011 iye.cba at gmail com
|
||||
# url: https://github.com/iye/lightsOn
|
||||
# This script is licensed under GNU GPL version 2.0 or above
|
||||
|
||||
# Description: Bash script that prevents the screensaver and display power
|
||||
# management (DPMS) to be activated when you are watching Flash Videos
|
||||
# fullscreen on Firefox and Chromium.
|
||||
# Can detect mplayer and VLC when they are fullscreen too but I have disabled
|
||||
# this by default.
|
||||
# lightsOn.sh needs xscreensaver, kscreensaver or gnome-screensaver to work.
|
||||
|
||||
# HOW TO USE: Start the script with the number of seconds you want the checks ./lightsOn.sh 590 &
|
||||
# for fullscreen to be done. Example:
|
||||
# "./lightsOn.sh 120 &" will Check every 120 seconds if Mplayer,
|
||||
# VLC, Firefox or Chromium are fullscreen and delay screensaver and Power Management if so.
|
||||
# You want the number of seconds to be ~10 seconds less than the time it takes
|
||||
# your screensaver or Power Management to activate.
|
||||
# If you don't pass an argument, the checks are done every 50 seconds.
|
||||
|
||||
|
||||
# Modify these variables if you want this script to detect if Mplayer,
|
||||
# VLC or Firefox Flash Video are Fullscreen and disable
|
||||
# xscreensaver/kscreensaver/gnome-screensaver and PowerManagement.
|
||||
mplayer_detection=1
|
||||
vlc_detection=1
|
||||
firefox_flash_detection=1
|
||||
chromium_flash_detection=1
|
||||
html5_detection=0 #checks if the browser window is fullscreen; will disable the screensaver if the browser window is in fullscreen so it doesn't work correctly if you always use the browser (Firefox or Chromium) in fullscreen
|
||||
|
||||
|
||||
# YOU SHOULD NOT NEED TO MODIFY ANYTHING BELOW THIS LINE
|
||||
|
||||
|
||||
# enumerate all the attached screens
|
||||
displays=""
|
||||
while read id
|
||||
do
|
||||
displays="$displays $id"
|
||||
done< <(xvinfo | sed -n 's/^screen #\([0-9]\+\)$/\1/p')
|
||||
|
||||
# Detect screensaver been used (xscreensaver, kscreensaver, gnome-screensaver or none)
|
||||
if [ `pgrep -l xscreensaver | grep -wc xscreensaver` -ge 1 ];then
|
||||
screensaver=xscreensaver
|
||||
elif [ `pgrep -l gnome-screensav | grep -wc gnome-screensav` -ge 1 ];then
|
||||
screensaver=gnome-screensav
|
||||
elif [ `pgrep -l kscreensaver | grep -wc kscreensaver` -ge 1 ];then
|
||||
screensaver=kscreensaver
|
||||
else
|
||||
screensaver=None
|
||||
echo "No screensaver detected"
|
||||
fi
|
||||
|
||||
|
||||
checkFullscreen()
|
||||
{
|
||||
# loop through every display looking for a fullscreen window
|
||||
for display in $displays
|
||||
do
|
||||
#get id of active window and clean output
|
||||
activ_win_id=`DISPLAY=:0.${display} xprop -root _NET_ACTIVE_WINDOW`
|
||||
#activ_win_id=${activ_win_id#*# } #gives error if xprop returns extra ", 0x0" (happens on some distros)
|
||||
activ_win_id=${activ_win_id:40:9}
|
||||
|
||||
# Skip invalid window ids (commented as I could not reproduce a case
|
||||
# where invalid id was returned, plus if id invalid
|
||||
# isActivWinFullscreen will fail anyway.)
|
||||
#if [ "$activ_win_id" = "0x0" ]; then
|
||||
# continue
|
||||
#fi
|
||||
|
||||
# Check if Active Window (the foremost window) is in fullscreen state
|
||||
isActivWinFullscreen=`DISPLAY=:0.${display} xprop -id $activ_win_id | grep _NET_WM_STATE_FULLSCREEN`
|
||||
if [[ "$isActivWinFullscreen" = *NET_WM_STATE_FULLSCREEN* ]];then
|
||||
isAppRunning
|
||||
var=$?
|
||||
if [[ $var -eq 1 ]];then
|
||||
delayScreensaver
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# check if active windows is mplayer, vlc or firefox
|
||||
#TODO only window name in the variable activ_win_id, not whole line.
|
||||
#Then change IFs to detect more specifically the apps "<vlc>" and if process name exist
|
||||
|
||||
isAppRunning()
|
||||
{
|
||||
#Get title of active window
|
||||
activ_win_title=`xprop -id $activ_win_id | grep "WM_CLASS(STRING)"` # I used WM_NAME(STRING) before, WM_CLASS more accurate.
|
||||
|
||||
|
||||
|
||||
# Check if user want to detect Video fullscreen on Firefox, modify variable firefox_flash_detection if you dont want Firefox detection
|
||||
if [ $firefox_flash_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *unknown* || "$activ_win_title" = *plugin-container* ]];then
|
||||
# Check if plugin-container process is running
|
||||
flash_process=`pgrep -l plugin-containe | grep -wc plugin-containe`
|
||||
#(why was I using this line avobe? delete if pgrep -lc works ok)
|
||||
#flash_process=`pgrep -lc plugin-containe`
|
||||
if [[ $flash_process -ge 1 ]];then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Check if user want to detect Video fullscreen on Chromium, modify variable chromium_flash_detection if you dont want Chromium detection
|
||||
if [ $chromium_flash_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *exe* ]];then
|
||||
# Check if Chromium Flash process is running
|
||||
if [[ `pgrep -lfc "chromium-browser --type=plugin --plugin-path=/usr/lib/adobe-flashplugin"` -ge 1 || `pgrep -lfc "chromium-browser --type=plugin --plugin-path=/usr/lib/flashplugin-installer"` -ge 1 ]];then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#html5 (Firefox or Chromium full-screen)
|
||||
if [ $html5_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *chromium-browser* || "$activ_win_title" = *Firefox* ]];then
|
||||
#check if firefox or chromium is running.
|
||||
if [[ `pgrep -l firefox | grep -wc firefox` -ge 1 || `pgrep -l chromium-browse | grep -wc chromium-browse` -ge 1 ]]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#check if user want to detect mplayer fullscreen, modify variable mplayer_detection
|
||||
if [ $mplayer_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *mplayer* || "$activ_win_title" = *MPlayer* ]];then
|
||||
#check if mplayer is running.
|
||||
#mplayer_process=`pgrep -l mplayer | grep -wc mplayer`
|
||||
mplayer_process=`pgrep -lc mplayer`
|
||||
if [ $mplayer_process -ge 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Check if user want to detect vlc fullscreen, modify variable vlc_detection
|
||||
if [ $vlc_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *vlc* ]];then
|
||||
#check if vlc is running.
|
||||
#vlc_process=`pgrep -l vlc | grep -wc vlc`
|
||||
vlc_process=`pgrep -lc vlc`
|
||||
if [ $vlc_process -ge 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
delayScreensaver()
|
||||
{
|
||||
|
||||
# reset inactivity time counter so screensaver is not started
|
||||
if [ "$screensaver" == "xscreensaver" ]; then
|
||||
#This tells xscreensaver to pretend that there has just been user activity. This means that if the screensaver is active (the screen is blanked), then this command will cause the screen to un-blank as if there had been keyboard or mouse activity. If the screen is locked, then the password dialog will pop up first, as usual. If the screen is not blanked, then this simulated user activity will re-start the countdown (so, issuing the -deactivate command periodically is one way to prevent the screen from blanking.)
|
||||
xscreensaver-command -deactivate > /dev/null
|
||||
elif [ "$screensaver" == "gnome-screensav" ]; then
|
||||
dbus-send --session --type=method_call --dest=org.gnome.ScreenSaver --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.SimulateUserActivity > /dev/null
|
||||
elif [ "$screensaver" == "kscreensaver" ]; then
|
||||
qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity > /dev/null
|
||||
fi
|
||||
|
||||
|
||||
#Check if DPMS is on. If it is, deactivate and reactivate again. If it is not, do nothing.
|
||||
dpmsStatus=`xset -q | grep -ce 'DPMS is Enabled'`
|
||||
if [ $dpmsStatus == 1 ];then
|
||||
xset -dpms
|
||||
xset dpms
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
delay=$1
|
||||
|
||||
|
||||
# If argument empty, use 50 seconds as default.
|
||||
if [ -z "$1" ];then
|
||||
delay=50
|
||||
fi
|
||||
|
||||
|
||||
# If argument is not integer quit.
|
||||
if [[ $1 = *[^0-9]* ]]; then
|
||||
echo "The Argument \"$1\" is not valid, not an integer"
|
||||
echo "Please use the time in seconds you want the checks to repeat."
|
||||
echo "You want it to be ~10 seconds less than the time it takes your screensaver or DPMS to activate"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
while true
|
||||
do
|
||||
checkFullscreen
|
||||
sleep $delay
|
||||
done
|
||||
|
||||
|
||||
exit 0
|
||||
|
5
Laptop/load_desktop_icon_pos.sh
Executable file
5
Laptop/load_desktop_icon_pos.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
rm -rf ~/.config/xfce4/desktop
|
||||
mkdir -p ~/.config/xfce4/desktop
|
||||
cp -f ~/.config/xfce4/desktop.bak/icons* ~/.config/xfce4/desktop
|
||||
xfdesktop --reload 2> /dev/null
|
27
Laptop/mkusb
Executable file
27
Laptop/mkusb
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
echo -n "Input path to ISO file (full path starting with /): "
|
||||
read iso
|
||||
echo
|
||||
echo -n "Input thumb drive device (i.e /dev/sdx): "
|
||||
read device
|
||||
echo
|
||||
echo -n "Warning: This will wipe the contents of your thumb drive
|
||||
continue?(y/n): "
|
||||
read continue
|
||||
|
||||
|
||||
|
||||
if [ "$continue" = "y" ]
|
||||
then echo "Writing blocks to device, this may take several minutes..."
|
||||
sudo dd bs=4M if=$iso of=$device
|
||||
echo "Finished writing blocks to device!"
|
||||
exit 0;
|
||||
|
||||
|
||||
elif [ "$continue" = "n" ]
|
||||
then exit 0;
|
||||
|
||||
fi
|
8
Laptop/monitor
Executable file
8
Laptop/monitor
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
while [ 1=1 ]
|
||||
do
|
||||
clear
|
||||
sensors
|
||||
sleep 1
|
||||
done
|
24
Laptop/mousemove
Normal file
24
Laptop/mousemove
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
mousemovefile=/tmp/mousemove
|
||||
|
||||
if [ -f $mousemovefile ];
|
||||
then
|
||||
rm $mousemovefile
|
||||
notify-send "Mouse moves no more" -i /usr/share/icons/gnome/48x48/devices/display.png
|
||||
else
|
||||
notify-send "MouseMoves" -i /usr/share/icons/gnome/48x48/devices/display.png
|
||||
touch $mousemovefile
|
||||
sleep .1
|
||||
while [ -f $mousemovefile ]
|
||||
do
|
||||
xdotool mousemove --sync 1000 500
|
||||
xdotool click 1
|
||||
sleep 3
|
||||
xdotool mousemove_relative --sync 0 80
|
||||
xdotool click 1
|
||||
sleep 1
|
||||
done
|
||||
|
||||
elseif
|
||||
sudo killall mousemove
|
||||
fi
|
BIN
Laptop/new_ip_script.tar.gz
Executable file
BIN
Laptop/new_ip_script.tar.gz
Executable file
Binary file not shown.
5
Laptop/performance.sh
Executable file
5
Laptop/performance.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo sed -i 's/^GOVERNOR=.*/GOVERNOR="performance"/' /etc/init.d/cpufrequtils
|
||||
|
||||
exit
|
4
Laptop/popme
Executable file
4
Laptop/popme
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
sudo ln -sf /lib/i386-linux-gnu/libudev.so.1 /lib/i386-linux-gnu/libudev.so.0
|
||||
~/Downloads/Popcorn-Time/Popcorn-Time #replace this line with the path to the executable you want to launch
|
||||
sudo rm /lib/i386-linux-gnu/libudev.so.0
|
1
Laptop/rm_all_old_kernels
Executable file
1
Laptop/rm_all_old_kernels
Executable file
@ -0,0 +1 @@
|
||||
export KERNEL="$(uname -r | grep -Po '([0-9\.\-]*[0-9])?')"; dpkg --get-selections | grep -E "linux-(header|image).*" | grep -iw install | sort | grep -v "$KERNEL" | grep -v "lts" | sed 's/install//g' | xargs dpkg -P
|
17
Laptop/screen_off
Executable file
17
Laptop/screen_off
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
screenOffLockFile=/tmp/screen-off-lock
|
||||
|
||||
if [ -f $screenOffLockFile ];
|
||||
then
|
||||
rm $screenOffLockFile
|
||||
notify-send "Screen on." -i /usr/share/icons/gnome/48x48/devices/display.png
|
||||
else
|
||||
touch $screenOffLockFile
|
||||
sleep .5
|
||||
while [ -f $screenOffLockFile ]
|
||||
do
|
||||
xset dpms force off
|
||||
sleep 2
|
||||
done
|
||||
xset dpms force on
|
||||
fi
|
17
Laptop/screen_off2
Executable file
17
Laptop/screen_off2
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
screenOffLockFile=/tmp/screen-off-lock
|
||||
|
||||
if [ -f $screenOffLockFile ];
|
||||
then
|
||||
rm $screenOffLockFile
|
||||
# notify-send "Screen on." -i /usr/share/icons/gnome/48x48/devices/display.png
|
||||
else
|
||||
touch $screenOffLockFile
|
||||
sleep .5
|
||||
while [ -f $screenOffLockFile ]
|
||||
do
|
||||
xset dpms force off
|
||||
sleep 2
|
||||
done
|
||||
xset dpms force on
|
||||
fi
|
36
Laptop/screensvv
Executable file
36
Laptop/screensvv
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
#screensvrlockfile=/tmp/screensvronlock
|
||||
#
|
||||
#if [ -f $screensvronlock ];
|
||||
#then
|
||||
# rm $screensvronlock
|
||||
#else
|
||||
# touch $screensvronlock
|
||||
# sleep .10
|
||||
# while [ -f $screensvronlock ]
|
||||
# do
|
||||
# xscreensaver-command -activate
|
||||
# sleep 3
|
||||
# done
|
||||
#fi
|
||||
|
||||
|
||||
|
||||
|
||||
screensvronlock=/tmp/screensvronlock
|
||||
|
||||
if [ -f $screensvronlock ];
|
||||
then
|
||||
rm $screensvronlock
|
||||
# notify-send "Screen on." -i /usr/share/icons/gnome/48x48/devices/display.png
|
||||
else
|
||||
touch $screensvronlock
|
||||
sleep .5
|
||||
while [ -f $screensvronlock ]
|
||||
do
|
||||
xscreensaver-command -activate
|
||||
sleep 2
|
||||
done
|
||||
xscreensaver-command -deactivate
|
||||
fi
|
||||
|
51
Laptop/serverfs.sh
Executable file
51
Laptop/serverfs.sh
Executable file
@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# Mount remote folders in thunar
|
||||
|
||||
|
||||
function main_menu()
|
||||
{
|
||||
|
||||
while [ 1=1 ]
|
||||
|
||||
do
|
||||
|
||||
echo "[1] - Mount remote folder in Thunar"
|
||||
|
||||
echo "[2] - Quick Mount"
|
||||
echo
|
||||
echo -n "Type here: "
|
||||
read choice
|
||||
|
||||
if [ "$choice" = "1" ]
|
||||
then mount_thuner
|
||||
|
||||
elif [ "$choice" = "2" ]
|
||||
thunar sftp://192.168.0.21:121
|
||||
|
||||
elif [ "$choice" = "q" ]
|
||||
then exit 0;
|
||||
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
function mount_thunar()
|
||||
{
|
||||
clear
|
||||
|
||||
echo -n "Enter ip address: "
|
||||
read ip
|
||||
|
||||
echo "Enter port: "
|
||||
read port
|
||||
|
||||
echo "*running thunar sftp://$ip:$port"
|
||||
|
||||
thunar sftp://$ip:$port
|
||||
|
||||
}
|
||||
|
||||
main_menu
|
2
Laptop/set_hdmi_sound_and_internal_mic
Executable file
2
Laptop/set_hdmi_sound_and_internal_mic
Executable file
@ -0,0 +1,2 @@
|
||||
pacmd set-card-profile 0 output:hdmi-stereo+input:analog-stereo && xrandr -d :0 --output HDMI1 --auto
|
||||
|
2
Laptop/set_hdmi_sound_and_internal_mic.bk
Executable file
2
Laptop/set_hdmi_sound_and_internal_mic.bk
Executable file
@ -0,0 +1,2 @@
|
||||
pacmd set-card-profile 0 output:hdmi-stereo+input:analog-stereo
|
||||
|
3
Laptop/set_hdmi_sound_video
Executable file
3
Laptop/set_hdmi_sound_video
Executable file
@ -0,0 +1,3 @@
|
||||
pacmd set-card-profile 0 output:hdmi-surround+input:analog-stereo && xrandr -d :0 --output HDMI1 --auto
|
||||
|
||||
|
1
Laptop/set_reset_x.sh
Executable file
1
Laptop/set_reset_x.sh
Executable file
@ -0,0 +1 @@
|
||||
setxkbmap -option terminate:ctrl_alt_bksp
|
21
Laptop/setfan
Executable file
21
Laptop/setfan
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo
|
||||
|
||||
echo -n "Enter a number 1-100 to set fan: "
|
||||
read set
|
||||
|
||||
|
||||
aticonfig --pplib-cmd "set fanspeed 0 $set"
|
||||
|
||||
|
||||
if (( "$set" >= "101" ))
|
||||
then echo "You trying to break my fan nigger?"
|
||||
|
||||
elif (( "$set" <= "100" ))
|
||||
then echo "Good job fucker you did it!"
|
||||
else
|
||||
echo "You typed in the wrong fucking shit faggot"
|
||||
fi
|
||||
|
||||
exit 0;
|
2
Laptop/shebangSH.txt
Normal file
2
Laptop/shebangSH.txt
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
|
2
Laptop/skype_record
Executable file
2
Laptop/skype_record
Executable file
@ -0,0 +1,2 @@
|
||||
ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq ~/Desktop/huh.mpg
|
||||
|
4
Laptop/sshserver
Executable file
4
Laptop/sshserver
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
echo
|
||||
ssh glitchd@192.168.1.119
|
||||
#ssh -p 133 glitchd@70.123.185.217
|
29
Laptop/systools
Executable file
29
Laptop/systools
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
while [ 1=1 ]
|
||||
|
||||
do
|
||||
|
||||
clear
|
||||
|
||||
|
||||
echo "[1] - AMD STATS (fan, memory, temp etc)"
|
||||
echo "[2] - SET FAN SPEED"
|
||||
echo
|
||||
echo -n "Please enter a number: "
|
||||
read choice
|
||||
|
||||
if [ "$choice" = "1" ]
|
||||
then temp
|
||||
read
|
||||
|
||||
elif [ "$choice" = "2" ]
|
||||
then setfan
|
||||
|
||||
else
|
||||
echo "Wrong key asshole dick bag"
|
||||
|
||||
fi
|
||||
|
||||
done
|
20
Laptop/temp
Executable file
20
Laptop/temp
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
#Temp of AMD GPU
|
||||
clear
|
||||
echo " ------------------"
|
||||
echo "|AMD GPU STATISTICS |"
|
||||
echo " ------------------"
|
||||
|
||||
echo
|
||||
echo "GPU TEMP"
|
||||
echo "--------"
|
||||
aticonfig --odgt
|
||||
echo "GPU/MEM CLOCKS"
|
||||
echo "--------------"
|
||||
aticonfig --od-getclocks
|
||||
echo "FAN SPEED"
|
||||
echo "---------"
|
||||
aticonfig --pplib-cmd "get fanspeed 0"
|
||||
|
||||
exit 0;
|
9
Laptop/thunarserver
Executable file
9
Laptop/thunarserver
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
IP=192.168.0.21
|
||||
PORT=121
|
||||
DIR=/var
|
||||
PROTOCOL=sftp://
|
||||
thunar $PROTOCOL$IP:$PORT$DIR
|
||||
|
||||
exit 0;
|
2
Laptop/update
Executable file
2
Laptop/update
Executable file
@ -0,0 +1,2 @@
|
||||
sudo apt-get update && sudo apt-get upgrade
|
||||
|
2
Laptop/update__
Executable file
2
Laptop/update__
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
sudo pacman -Syy && sudo pacman -Syu
|
2
Laptop/ver
Executable file
2
Laptop/ver
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
lsb_release -a
|
1
Laptop/video_convert_scripts/change_container_to_avi_Xbox
Executable file
1
Laptop/video_convert_scripts/change_container_to_avi_Xbox
Executable file
@ -0,0 +1 @@
|
||||
ffmpeg -i ThePianist.mpg -vcodec mpeg4 -b 512k -acodec mp2 -ac 2 -ab 128k ThePianist.avi
|
@ -0,0 +1,2 @@
|
||||
ffmpeg -i movie.mkv -vcodec copy -acodec copy Movie.mp4
|
||||
|
15
Laptop/video_convert_scripts/mkv2mp4
Executable file
15
Laptop/video_convert_scripts/mkv2mp4
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
audiofile=`mktemp`
|
||||
videofile=`mktemp`
|
||||
|
||||
cd "`pwd`"
|
||||
|
||||
avconv -i $1 -vn -acodec pcm_s16le -ac 2 $audiofile.wav &> /dev/null
|
||||
normalize-audio $audiofile.wav &> /dev/null
|
||||
faac -c 48000 -q 100 $audiofile.wav &>/dev/null
|
||||
mkvextract tracks $1 1:$videofile.h264 &> /dev/null
|
||||
MP4Box -fps 23.976 -add $videofile.h264 -add $audiofile.aac ${1%.*}.mp4 &> /dev/null
|
||||
|
||||
# cleanup
|
||||
rm $audiofile $videofile
|
||||
|
1
Laptop/video_convert_scripts/rename_m4v_to_avi
Executable file
1
Laptop/video_convert_scripts/rename_m4v_to_avi
Executable file
@ -0,0 +1 @@
|
||||
rename videos with ".m4v" extension to ".avi" for play back on xbox 360
|
29
Laptop/video_convert_scripts/xbox_video_convert_mkv2m4v.sh
Executable file
29
Laptop/video_convert_scripts/xbox_video_convert_mkv2m4v.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
# script to convert an mkv to m4v
|
||||
|
||||
if [ "$1" -a "$2" ];
|
||||
then
|
||||
|
||||
filename=`basename "$1" .mkv`
|
||||
fps=`mkvinfo "$filename".mkv|grep "Default duration"|head -n 1|cut -d'(' -f2|cut -c 1-6`
|
||||
#sfreq=`mkvinfo "$filename".mkv|grep "Sampling frequency"|head -n 1|cut -d':' -f2|cut -c 2-6`
|
||||
|
||||
mkvextract tracks "$filename".mkv 1:video.h264
|
||||
|
||||
ffmpeg -i "$filename".mkv -vn -acodec pcm_s16le -ac 2 audio.wav
|
||||
|
||||
normalize-audio audio.wav
|
||||
|
||||
#faac -c $sfreq audio.wav
|
||||
neroAacEnc -br $2 -lc -if audio.wav -of audio.aac
|
||||
|
||||
MP4Box -fps $fps -add video.h264 -add audio.aac "$filename".m4v
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
rm audio.aac audio.wav video.h264
|
||||
echo "All Done!"
|
||||
fi
|
||||
|
||||
else
|
||||
echo "Usage: mkv2m4v.sh {filename} {target audio bitrate (eg: 128000)}"
|
||||
fi
|
3
Laptop/wakeserver
Executable file
3
Laptop/wakeserver
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
wakeonlan 00:1d:60:9c:eb:eb
|
||||
|
18
README.md
Normal file
18
README.md
Normal file
@ -0,0 +1,18 @@
|
||||
## Scripts
|
||||
|
||||
# USE THIS SHIT
|
||||
|
||||
I don't have anything to write, but this is just to show you what happens
|
||||
okE
|
||||
Very time you change a files, that third icon lights the fuck up
|
||||
that's telling you there are changes
|
||||
then the files that changed
|
||||
|
||||
see that M next to the file name on the left?
|
||||
That means "modified"
|
||||
you click the plus button next to it
|
||||
Now you write a message saying what the fuck changed
|
||||
well that was a one time error that I fixed there.
|
||||
Lets try modifying this file again and pushing it
|
||||
|
||||
|
1
Server/kill_lxde
Executable file
1
Server/kill_lxde
Executable file
@ -0,0 +1 @@
|
||||
sudo killall lxsession
|
1
Server/kill_lxde.sh
Executable file
1
Server/kill_lxde.sh
Executable file
@ -0,0 +1 @@
|
||||
sudo killall lxsession
|
24
Server/mousemove
Executable file
24
Server/mousemove
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
mousemovefile=/tmp/mousemove
|
||||
|
||||
if [ -f $mousemovefile ];
|
||||
then
|
||||
rm $mousemovefile
|
||||
notify-send "Mouse moves no more" -i /usr/share/icons/gnome/48x48/devices/display.png
|
||||
else
|
||||
notify-send "MouseMoves" -i /usr/share/icons/gnome/48x48/devices/display.png
|
||||
touch $mousemovefile
|
||||
sleep .1
|
||||
while [ -f $mousemovefile ]
|
||||
do
|
||||
xdotool mousemove --sync 0 500
|
||||
# xdotool click 1
|
||||
sleep 3
|
||||
xdotool mousemove_relative --sync 1000 500
|
||||
# xdotool click 1
|
||||
sleep 1
|
||||
done
|
||||
|
||||
elseif
|
||||
sudo killall mousemove
|
||||
fi
|
7
Server/new-ss
Executable file
7
Server/new-ss
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
while true; do
|
||||
|
||||
xscreensaver-command -activate
|
||||
|
||||
done
|
17
Server/screen_off
Executable file
17
Server/screen_off
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
screenOffLockFile=/tmp/screen-off-lock
|
||||
|
||||
if [ -f $screenOffLockFile ];
|
||||
then
|
||||
rm $screenOffLockFile
|
||||
# notify-send "Screen on." -i /usr/share/icons/gnome/48x48/devices/display.png
|
||||
else
|
||||
touch $screenOffLockFile
|
||||
sleep .5
|
||||
while [ -f $screenOffLockFile ]
|
||||
do
|
||||
xset dpms force off
|
||||
sleep 2
|
||||
done
|
||||
xset dpms force on
|
||||
fi
|
10
Server/screensaveronoff
Executable file
10
Server/screensaveronoff
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
while true;do
|
||||
|
||||
if [ 1=1 ]; then
|
||||
|
||||
xscreensaver-command -activate
|
||||
|
||||
fi
|
||||
done
|
36
Server/screensvv
Executable file
36
Server/screensvv
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
#screensvrlockfile=/tmp/screensvronlock
|
||||
#
|
||||
#if [ -f $screensvronlock ];
|
||||
#then
|
||||
# rm $screensvronlock
|
||||
#else
|
||||
# touch $screensvronlock
|
||||
# sleep .10
|
||||
# while [ -f $screensvronlock ]
|
||||
# do
|
||||
# xscreensaver-command -activate
|
||||
# sleep 3
|
||||
# done
|
||||
#fi
|
||||
|
||||
|
||||
|
||||
|
||||
screensvronlock=/tmp/screensvronlock
|
||||
|
||||
if [ -f $screensvronlock ];
|
||||
then
|
||||
rm $screensvronlock
|
||||
# notify-send "Screen on." -i /usr/share/icons/gnome/48x48/devices/display.png
|
||||
else
|
||||
touch $screensvronlock
|
||||
sleep .6
|
||||
while [ -f $screensvronlock ]
|
||||
do
|
||||
xscreensaver-command -activate
|
||||
sleep 3
|
||||
done
|
||||
fi
|
||||
|
||||
|
10
Server/screensvv.desktop
Executable file
10
Server/screensvv.desktop
Executable file
@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=screensvv
|
||||
Comment=
|
||||
Exec=/home/glitchd/screensvv
|
||||
Icon=
|
||||
Path=
|
||||
Terminal=false
|
||||
StartupNotify=false
|
217
back_up_original__lightsOn.sh
Executable file
217
back_up_original__lightsOn.sh
Executable file
@ -0,0 +1,217 @@
|
||||
#!/bin/bash
|
||||
# lightsOn.sh
|
||||
|
||||
# Copyright (c) 2011 iye.cba at gmail com
|
||||
# url: https://github.com/iye/lightsOn
|
||||
# This script is licensed under GNU GPL version 2.0 or above
|
||||
|
||||
# Description: Bash script that prevents the screensaver and display power
|
||||
# management (DPMS) to be activated when you are watching Flash Videos
|
||||
# fullscreen on Firefox and Chromium.
|
||||
# Can detect mplayer and VLC when they are fullscreen too but I have disabled
|
||||
# this by default.
|
||||
# lightsOn.sh needs xscreensaver, kscreensaver or gnome-screensaver to work.
|
||||
|
||||
# HOW TO USE: Start the script with the number of seconds you want the checks ./lightsOn.sh 590 &
|
||||
# for fullscreen to be done. Example:
|
||||
# "./lightsOn.sh 120 &" will Check every 120 seconds if Mplayer,
|
||||
# VLC, Firefox or Chromium are fullscreen and delay screensaver and Power Management if so.
|
||||
# You want the number of seconds to be ~10 seconds less than the time it takes
|
||||
# your screensaver or Power Management to activate.
|
||||
# If you don't pass an argument, the checks are done every 50 seconds.
|
||||
|
||||
|
||||
# Modify these variables if you want this script to detect if Mplayer,
|
||||
# VLC or Firefox Flash Video are Fullscreen and disable
|
||||
# xscreensaver/kscreensaver/gnome-screensaver and PowerManagement.
|
||||
mplayer_detection=1
|
||||
vlc_detection=1
|
||||
firefox_flash_detection=1
|
||||
chromium_flash_detection=1
|
||||
html5_detection=0 #checks if the browser window is fullscreen; will disable the screensaver if the browser window is in fullscreen so it doesn't work correctly if you always use the browser (Firefox or Chromium) in fullscreen
|
||||
|
||||
|
||||
# YOU SHOULD NOT NEED TO MODIFY ANYTHING BELOW THIS LINE
|
||||
|
||||
|
||||
# enumerate all the attached screens
|
||||
displays=""
|
||||
while read id
|
||||
do
|
||||
displays="$displays $id"
|
||||
done< <(xvinfo | sed -n 's/^screen #\([0-9]\+\)$/\1/p')
|
||||
|
||||
# Detect screensaver been used (xscreensaver, kscreensaver, gnome-screensaver or none)
|
||||
if [ `pgrep -l xscreensaver | grep -wc xscreensaver` -ge 1 ];then
|
||||
screensaver=xscreensaver
|
||||
elif [ `pgrep -l gnome-screensav | grep -wc gnome-screensav` -ge 1 ];then
|
||||
screensaver=gnome-screensav
|
||||
elif [ `pgrep -l kscreensaver | grep -wc kscreensaver` -ge 1 ];then
|
||||
screensaver=kscreensaver
|
||||
else
|
||||
screensaver=None
|
||||
echo "No screensaver detected"
|
||||
fi
|
||||
|
||||
|
||||
checkFullscreen()
|
||||
{
|
||||
# loop through every display looking for a fullscreen window
|
||||
for display in $displays
|
||||
do
|
||||
#get id of active window and clean output
|
||||
activ_win_id=`DISPLAY=:0.${display} xprop -root _NET_ACTIVE_WINDOW`
|
||||
#activ_win_id=${activ_win_id#*# } #gives error if xprop returns extra ", 0x0" (happens on some distros)
|
||||
activ_win_id=${activ_win_id:40:9}
|
||||
|
||||
# Skip invalid window ids (commented as I could not reproduce a case
|
||||
# where invalid id was returned, plus if id invalid
|
||||
# isActivWinFullscreen will fail anyway.)
|
||||
#if [ "$activ_win_id" = "0x0" ]; then
|
||||
# continue
|
||||
#fi
|
||||
|
||||
# Check if Active Window (the foremost window) is in fullscreen state
|
||||
isActivWinFullscreen=`DISPLAY=:0.${display} xprop -id $activ_win_id | grep _NET_WM_STATE_FULLSCREEN`
|
||||
if [[ "$isActivWinFullscreen" = *NET_WM_STATE_FULLSCREEN* ]];then
|
||||
isAppRunning
|
||||
var=$?
|
||||
if [[ $var -eq 1 ]];then
|
||||
delayScreensaver
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# check if active windows is mplayer, vlc or firefox
|
||||
#TODO only window name in the variable activ_win_id, not whole line.
|
||||
#Then change IFs to detect more specifically the apps "<vlc>" and if process name exist
|
||||
|
||||
isAppRunning()
|
||||
{
|
||||
#Get title of active window
|
||||
activ_win_title=`xprop -id $activ_win_id | grep "WM_CLASS(STRING)"` # I used WM_NAME(STRING) before, WM_CLASS more accurate.
|
||||
|
||||
|
||||
|
||||
# Check if user want to detect Video fullscreen on Firefox, modify variable firefox_flash_detection if you dont want Firefox detection
|
||||
if [ $firefox_flash_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *unknown* || "$activ_win_title" = *plugin-container* ]];then
|
||||
# Check if plugin-container process is running
|
||||
flash_process=`pgrep -l plugin-containe | grep -wc plugin-containe`
|
||||
#(why was I using this line avobe? delete if pgrep -lc works ok)
|
||||
#flash_process=`pgrep -lc plugin-containe`
|
||||
if [[ $flash_process -ge 1 ]];then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Check if user want to detect Video fullscreen on Chromium, modify variable chromium_flash_detection if you dont want Chromium detection
|
||||
if [ $chromium_flash_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *exe* ]];then
|
||||
# Check if Chromium Flash process is running
|
||||
if [[ `pgrep -lfc "chromium-browser --type=plugin --plugin-path=/usr/lib/adobe-flashplugin"` -ge 1 || `pgrep -lfc "chromium-browser --type=plugin --plugin-path=/usr/lib/flashplugin-installer"` -ge 1 ]];then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#html5 (Firefox or Chromium full-screen)
|
||||
if [ $html5_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *chromium-browser* || "$activ_win_title" = *Firefox* ]];then
|
||||
#check if firefox or chromium is running.
|
||||
if [[ `pgrep -l firefox | grep -wc firefox` -ge 1 || `pgrep -l chromium-browse | grep -wc chromium-browse` -ge 1 ]]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#check if user want to detect mplayer fullscreen, modify variable mplayer_detection
|
||||
if [ $mplayer_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *mplayer* || "$activ_win_title" = *MPlayer* ]];then
|
||||
#check if mplayer is running.
|
||||
#mplayer_process=`pgrep -l mplayer | grep -wc mplayer`
|
||||
mplayer_process=`pgrep -lc mplayer`
|
||||
if [ $mplayer_process -ge 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Check if user want to detect vlc fullscreen, modify variable vlc_detection
|
||||
if [ $vlc_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *vlc* ]];then
|
||||
#check if vlc is running.
|
||||
#vlc_process=`pgrep -l vlc | grep -wc vlc`
|
||||
vlc_process=`pgrep -lc vlc`
|
||||
if [ $vlc_process -ge 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
delayScreensaver()
|
||||
{
|
||||
|
||||
# reset inactivity time counter so screensaver is not started
|
||||
if [ "$screensaver" == "xscreensaver" ]; then
|
||||
#This tells xscreensaver to pretend that there has just been user activity. This means that if the screensaver is active (the screen is blanked), then this command will cause the screen to un-blank as if there had been keyboard or mouse activity. If the screen is locked, then the password dialog will pop up first, as usual. If the screen is not blanked, then this simulated user activity will re-start the countdown (so, issuing the -deactivate command periodically is one way to prevent the screen from blanking.)
|
||||
xscreensaver-command -deactivate > /dev/null
|
||||
elif [ "$screensaver" == "gnome-screensav" ]; then
|
||||
dbus-send --session --type=method_call --dest=org.gnome.ScreenSaver --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.SimulateUserActivity > /dev/null
|
||||
elif [ "$screensaver" == "kscreensaver" ]; then
|
||||
qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity > /dev/null
|
||||
fi
|
||||
|
||||
|
||||
#Check if DPMS is on. If it is, deactivate and reactivate again. If it is not, do nothing.
|
||||
dpmsStatus=`xset -q | grep -ce 'DPMS is Enabled'`
|
||||
if [ $dpmsStatus == 1 ];then
|
||||
xset -dpms
|
||||
xset dpms
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
delay=$1
|
||||
|
||||
|
||||
# If argument empty, use 50 seconds as default.
|
||||
if [ -z "$1" ];then
|
||||
delay=50
|
||||
fi
|
||||
|
||||
|
||||
# If argument is not integer quit.
|
||||
if [[ $1 = *[^0-9]* ]]; then
|
||||
echo "The Argument \"$1\" is not valid, not an integer"
|
||||
echo "Please use the time in seconds you want the checks to repeat."
|
||||
echo "You want it to be ~10 seconds less than the time it takes your screensaver or DPMS to activate"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
while true
|
||||
do
|
||||
checkFullscreen
|
||||
sleep $delay
|
||||
done
|
||||
|
||||
|
||||
exit 0
|
||||
|
217
backup_lightsOn.sh
Executable file
217
backup_lightsOn.sh
Executable file
@ -0,0 +1,217 @@
|
||||
#!/bin/bash
|
||||
# lightsOn.sh
|
||||
|
||||
# Copyright (c) 2011 iye.cba at gmail com
|
||||
# url: https://github.com/iye/lightsOn
|
||||
# This script is licensed under GNU GPL version 2.0 or above
|
||||
|
||||
# Description: Bash script that prevents the screensaver and display power
|
||||
# management (DPMS) to be activated when you are watching Flash Videos
|
||||
# fullscreen on Firefox and Chromium.
|
||||
# Can detect mplayer and VLC when they are fullscreen too but I have disabled
|
||||
# this by default.
|
||||
# lightsOn.sh needs xscreensaver, kscreensaver or gnome-screensaver to work.
|
||||
|
||||
# HOW TO USE: Start the script with the number of seconds you want the checks
|
||||
# for fullscreen to be done. Example:
|
||||
# "./lightsOn.sh 120 &" will Check every 120 seconds if Mplayer,
|
||||
# VLC, Firefox or Chromium are fullscreen and delay screensaver and Power Management if so.
|
||||
# You want the number of seconds to be ~10 seconds less than the time it takes
|
||||
# your screensaver or Power Management to activate.
|
||||
# If you don't pass an argument, the checks are done every 50 seconds.
|
||||
|
||||
|
||||
# Modify these variables if you want this script to detect if Mplayer,
|
||||
# VLC or Firefox Flash Video are Fullscreen and disable
|
||||
# xscreensaver/kscreensaver/gnome-screensaver and PowerManagement.
|
||||
mplayer_detection=0
|
||||
vlc_detection=1
|
||||
firefox_flash_detection=1
|
||||
chromium_flash_detection=1
|
||||
html5_detection=0 #checks if the browser window is fullscreen; will disable the screensaver if the browser window is in fullscreen so it doesn't work correctly if you always use the browser (Firefox or Chromium) in fullscreen
|
||||
|
||||
|
||||
# YOU SHOULD NOT NEED TO MODIFY ANYTHING BELOW THIS LINE
|
||||
|
||||
|
||||
# enumerate all the attached screens
|
||||
displays=""
|
||||
while read id
|
||||
do
|
||||
displays="$displays $id"
|
||||
done< <(xvinfo | sed -n 's/^screen #\([0-9]\+\)$/\1/p')
|
||||
|
||||
# Detect screensaver been used (xscreensaver, kscreensaver, gnome-screensaver or none)
|
||||
if [ `pgrep -l xscreensaver | grep -wc xscreensaver` -ge 1 ];then
|
||||
screensaver=xscreensaver
|
||||
elif [ `pgrep -l gnome-screensav | grep -wc gnome-screensav` -ge 1 ];then
|
||||
screensaver=gnome-screensav
|
||||
elif [ `pgrep -l kscreensaver | grep -wc kscreensaver` -ge 1 ];then
|
||||
screensaver=kscreensaver
|
||||
else
|
||||
screensaver=None
|
||||
echo "No screensaver detected"
|
||||
fi
|
||||
|
||||
|
||||
checkFullscreen()
|
||||
{
|
||||
# loop through every display looking for a fullscreen window
|
||||
for display in $displays
|
||||
do
|
||||
#get id of active window and clean output
|
||||
activ_win_id=`DISPLAY=:0.${display} xprop -root _NET_ACTIVE_WINDOW`
|
||||
#activ_win_id=${activ_win_id#*# } #gives error if xprop returns extra ", 0x0" (happens on some distros)
|
||||
activ_win_id=${activ_win_id:40:9}
|
||||
|
||||
# Skip invalid window ids (commented as I could not reproduce a case
|
||||
# where invalid id was returned, plus if id invalid
|
||||
# isActivWinFullscreen will fail anyway.)
|
||||
#if [ "$activ_win_id" = "0x0" ]; then
|
||||
# continue
|
||||
#fi
|
||||
|
||||
# Check if Active Window (the foremost window) is in fullscreen state
|
||||
isActivWinFullscreen=`DISPLAY=:0.${display} xprop -id $activ_win_id | grep _NET_WM_STATE_FULLSCREEN`
|
||||
if [[ "$isActivWinFullscreen" = *NET_WM_STATE_FULLSCREEN* ]];then
|
||||
isAppRunning
|
||||
var=$?
|
||||
if [[ $var -eq 1 ]];then
|
||||
delayScreensaver
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# check if active windows is mplayer, vlc or firefox
|
||||
#TODO only window name in the variable activ_win_id, not whole line.
|
||||
#Then change IFs to detect more specifically the apps "<vlc>" and if process name exist
|
||||
|
||||
isAppRunning()
|
||||
{
|
||||
#Get title of active window
|
||||
activ_win_title=`xprop -id $activ_win_id | grep "WM_CLASS(STRING)"` # I used WM_NAME(STRING) before, WM_CLASS more accurate.
|
||||
|
||||
|
||||
|
||||
# Check if user want to detect Video fullscreen on Firefox, modify variable firefox_flash_detection if you dont want Firefox detection
|
||||
if [ $firefox_flash_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *unknown* || "$activ_win_title" = *plugin-container* ]];then
|
||||
# Check if plugin-container process is running
|
||||
flash_process=`pgrep -l plugin-containe | grep -wc plugin-containe`
|
||||
#(why was I using this line avobe? delete if pgrep -lc works ok)
|
||||
#flash_process=`pgrep -lc plugin-containe`
|
||||
if [[ $flash_process -ge 1 ]];then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Check if user want to detect Video fullscreen on Chromium, modify variable chromium_flash_detection if you dont want Chromium detection
|
||||
if [ $chromium_flash_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *exe* ]];then
|
||||
# Check if Chromium Flash process is running
|
||||
if [[ `pgrep -lfc "chromium-browser --type=plugin --plugin-path=/usr/lib/adobe-flashplugin"` -ge 1 || `pgrep -lfc "chromium-browser --type=plugin --plugin-path=/usr/lib/flashplugin-installer"` -ge 1 ]];then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#html5 (Firefox or Chromium full-screen)
|
||||
if [ $html5_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *chromium-browser* || "$activ_win_title" = *Firefox* ]];then
|
||||
#check if firefox or chromium is running.
|
||||
if [[ `pgrep -l firefox | grep -wc firefox` -ge 1 || `pgrep -l chromium-browse | grep -wc chromium-browse` -ge 1 ]]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#check if user want to detect mplayer fullscreen, modify variable mplayer_detection
|
||||
if [ $mplayer_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *mplayer* || "$activ_win_title" = *MPlayer* ]];then
|
||||
#check if mplayer is running.
|
||||
#mplayer_process=`pgrep -l mplayer | grep -wc mplayer`
|
||||
mplayer_process=`pgrep -lc mplayer`
|
||||
if [ $mplayer_process -ge 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Check if user want to detect vlc fullscreen, modify variable vlc_detection
|
||||
if [ $vlc_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *vlc* ]];then
|
||||
#check if vlc is running.
|
||||
#vlc_process=`pgrep -l vlc | grep -wc vlc`
|
||||
vlc_process=`pgrep -lc vlc`
|
||||
if [ $vlc_process -ge 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
delayScreensaver()
|
||||
{
|
||||
|
||||
# reset inactivity time counter so screensaver is not started
|
||||
if [ "$screensaver" == "xscreensaver" ]; then
|
||||
#This tells xscreensaver to pretend that there has just been user activity. This means that if the screensaver is active (the screen is blanked), then this command will cause the screen to un-blank as if there had been keyboard or mouse activity. If the screen is locked, then the password dialog will pop up first, as usual. If the screen is not blanked, then this simulated user activity will re-start the countdown (so, issuing the -deactivate command periodically is one way to prevent the screen from blanking.)
|
||||
xscreensaver-command -deactivate > /dev/null
|
||||
elif [ "$screensaver" == "gnome-screensav" ]; then
|
||||
dbus-send --session --type=method_call --dest=org.gnome.ScreenSaver --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.SimulateUserActivity > /dev/null
|
||||
elif [ "$screensaver" == "kscreensaver" ]; then
|
||||
qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity > /dev/null
|
||||
fi
|
||||
|
||||
|
||||
#Check if DPMS is on. If it is, deactivate and reactivate again. If it is not, do nothing.
|
||||
dpmsStatus=`xset -q | grep -ce 'DPMS is Enabled'`
|
||||
if [ $dpmsStatus == 1 ];then
|
||||
xset -dpms
|
||||
xset dpms
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
delay=$1
|
||||
|
||||
|
||||
# If argument empty, use 50 seconds as default.
|
||||
if [ -z "$1" ];then
|
||||
delay=50
|
||||
fi
|
||||
|
||||
|
||||
# If argument is not integer quit.
|
||||
if [[ $1 = *[^0-9]* ]]; then
|
||||
echo "The Argument \"$1\" is not valid, not an integer"
|
||||
echo "Please use the time in seconds you want the checks to repeat."
|
||||
echo "You want it to be ~10 seconds less than the time it takes your screensaver or DPMS to activate"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
while true
|
||||
do
|
||||
checkFullscreen
|
||||
sleep $delay
|
||||
done
|
||||
|
||||
|
||||
exit 0
|
||||
|
15
backup_template.sh
Executable file
15
backup_template.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
function backup(){
|
||||
|
||||
sourceDir=""
|
||||
backupDir=""
|
||||
export PASSPHRASE=sonypony
|
||||
duplicity ${sourceDir} file://${backupDir}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
1
base_script.txt
Executable file
1
base_script.txt
Executable file
@ -0,0 +1 @@
|
||||
#!/bin/bash
|
29
blah
Executable file
29
blah
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
#variables can have almost any name
|
||||
#you just can't have spaces or crazy special characters
|
||||
#To illustrate this I will make variables with stupid names
|
||||
|
||||
GIANTDICK="die bitch" #anything in double quotes will be treated as text
|
||||
NIGGERS="I hate niggers"
|
||||
|
||||
#now we can echo the variables
|
||||
#mind you that if the variables have no value, nothing will show up
|
||||
#thankfully we put racial slurs and cuss words in them
|
||||
|
||||
echo $GIANTDICK #notice the dollar sign, this is how you call a variable
|
||||
echo $NIGGERS
|
||||
|
||||
#you can use these variables anywhere in your script
|
||||
|
||||
echo "One day I woke up and I thought yo myself, ${NIGGERS}!"
|
||||
|
||||
#if you put curly braces around the name of the variable,
|
||||
#bash won't think that the explaimation point is part of the variable
|
||||
#I had this happen to me once because I didn't use curly braces.
|
||||
|
||||
#well that's pretty much it for variables
|
||||
#since I commented out the text of me explaining things, you can run this script and it will work
|
||||
|
||||
#Feel free to play around with it, but make sure you make a copy before you do so.
|
||||
# I hope this helps you bro!
|
3
blockscheduler
Executable file
3
blockscheduler
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
cat /sys/block/sda/queue/scheduler
|
||||
exit
|
727
chill.sh
Executable file
727
chill.sh
Executable file
@ -0,0 +1,727 @@
|
||||
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="">
|
||||
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#">
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Content-Language" content="en">
|
||||
|
||||
|
||||
<title>chill-script/chill.sh at master · silvernode/chill-script · GitHub</title>
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
|
||||
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-114.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-144.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144.png">
|
||||
<meta property="fb:app_id" content="1401488693436528">
|
||||
|
||||
<meta content="@github" name="twitter:site" /><meta content="summary" name="twitter:card" /><meta content="silvernode/chill-script" name="twitter:title" /><meta content="chill-script - Countdown to next bong hit" name="twitter:description" /><meta content="https://avatars1.githubusercontent.com/u/401972?v=3&s=400" name="twitter:image:src" />
|
||||
<meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="https://avatars1.githubusercontent.com/u/401972?v=3&s=400" property="og:image" /><meta content="silvernode/chill-script" property="og:title" /><meta content="https://github.com/silvernode/chill-script" property="og:url" /><meta content="chill-script - Countdown to next bong hit" property="og:description" />
|
||||
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
|
||||
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
|
||||
<link rel="assets" href="https://assets-cdn.github.com/">
|
||||
|
||||
<meta name="pjax-timeout" content="1000">
|
||||
|
||||
|
||||
<meta name="msapplication-TileImage" content="/windows-tile.png">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="selected-link" value="repo_source" data-pjax-transient>
|
||||
<meta name="google-analytics" content="UA-3769691-2">
|
||||
|
||||
<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="collector-cdn.github.com" name="octolytics-script-host" /><meta content="github" name="octolytics-app-id" /><meta content="467BB9D9:2CC1:9F2CC56:5557195F" name="octolytics-dimension-request_id" />
|
||||
|
||||
<meta content="Rails, view, blob#show" name="analytics-event" />
|
||||
<meta class="js-ga-set" name="dimension1" content="Logged Out">
|
||||
<meta class="js-ga-set" name="dimension2" content="Header v3">
|
||||
<meta name="is-dotcom" content="true">
|
||||
<meta name="hostname" content="github.com">
|
||||
<meta name="user-login" content="">
|
||||
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
|
||||
|
||||
|
||||
<meta content="authenticity_token" name="csrf-param" />
|
||||
<meta content="4e4WIndlmXenzyzroJAE+/PHiqUl5t2WDjtxLIfpDxFEiquZ3IRDpYzlfMKpWlJIpWU5wljG76SK4etEsZ//Gg==" name="csrf-token" />
|
||||
|
||||
<link href="https://assets-cdn.github.com/assets/github/index-d80e093fe7c48ff920ce83dfd2ad7c02806722220d164b49101ed783098ea618.css" media="all" rel="stylesheet" />
|
||||
<link href="https://assets-cdn.github.com/assets/github2/index-99a58ea750b0547d1266460cd4ade0c2c81ed8c524cbba4ea5e3b37e18daec79.css" media="all" rel="stylesheet" />
|
||||
|
||||
|
||||
|
||||
|
||||
<meta http-equiv="x-pjax-version" content="282d80bd51fc0e03270191711c02f726">
|
||||
|
||||
|
||||
<meta name="description" content="chill-script - Countdown to next bong hit">
|
||||
<meta name="go-import" content="github.com/silvernode/chill-script git https://github.com/silvernode/chill-script.git">
|
||||
|
||||
<meta content="401972" name="octolytics-dimension-user_id" /><meta content="silvernode" name="octolytics-dimension-user_login" /><meta content="35718958" name="octolytics-dimension-repository_id" /><meta content="silvernode/chill-script" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="false" name="octolytics-dimension-repository_is_fork" /><meta content="35718958" name="octolytics-dimension-repository_network_root_id" /><meta content="silvernode/chill-script" name="octolytics-dimension-repository_network_root_nwo" />
|
||||
<link href="https://github.com/silvernode/chill-script/commits/master.atom" rel="alternate" title="Recent Commits to chill-script:master" type="application/atom+xml">
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body class="logged_out env-production linux vis-public page-blob">
|
||||
<a href="#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a>
|
||||
<div class="wrapper">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="header header-logged-out" role="banner">
|
||||
<div class="container clearfix">
|
||||
|
||||
<a class="header-logo-wordmark" href="https://github.com/" data-ga-click="(Logged out) Header, go to homepage, icon:logo-wordmark">
|
||||
<span class="mega-octicon octicon-logo-github"></span>
|
||||
</a>
|
||||
|
||||
<div class="header-actions" role="navigation">
|
||||
<a class="btn btn-primary" href="/join" data-ga-click="(Logged out) Header, clicked Sign up, text:sign-up">Sign up</a>
|
||||
<a class="btn" href="/login?return_to=%2Fsilvernode%2Fchill-script%2Fblob%2Fmaster%2Fchill.sh" data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">Sign in</a>
|
||||
</div>
|
||||
|
||||
<div class="site-search repo-scope js-site-search" role="search">
|
||||
<form accept-charset="UTF-8" action="/silvernode/chill-script/search" class="js-site-search-form" data-global-search-url="/search" data-repo-search-url="/silvernode/chill-script/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
|
||||
<label class="js-chromeless-input-container form-control">
|
||||
<div class="scope-badge">This repository</div>
|
||||
<input type="text"
|
||||
class="js-site-search-focus js-site-search-field is-clearable chromeless-input"
|
||||
data-hotkey="s"
|
||||
name="q"
|
||||
placeholder="Search"
|
||||
data-global-scope-placeholder="Search GitHub"
|
||||
data-repo-scope-placeholder="Search"
|
||||
tabindex="1"
|
||||
autocapitalize="off">
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<ul class="header-nav left" role="navigation">
|
||||
<li class="header-nav-item">
|
||||
<a class="header-nav-link" href="/explore" data-ga-click="(Logged out) Header, go to explore, text:explore">Explore</a>
|
||||
</li>
|
||||
<li class="header-nav-item">
|
||||
<a class="header-nav-link" href="/features" data-ga-click="(Logged out) Header, go to features, text:features">Features</a>
|
||||
</li>
|
||||
<li class="header-nav-item">
|
||||
<a class="header-nav-link" href="https://enterprise.github.com/" data-ga-click="(Logged out) Header, go to enterprise, text:enterprise">Enterprise</a>
|
||||
</li>
|
||||
<li class="header-nav-item">
|
||||
<a class="header-nav-link" href="/blog" data-ga-click="(Logged out) Header, go to blog, text:blog">Blog</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="start-of-content" class="accessibility-aid"></div>
|
||||
<div class="site" itemscope itemtype="http://schema.org/WebPage">
|
||||
<div id="js-flash-container">
|
||||
|
||||
</div>
|
||||
<div class="pagehead repohead instapaper_ignore readability-menu">
|
||||
<div class="container">
|
||||
|
||||
<ul class="pagehead-actions">
|
||||
|
||||
<li>
|
||||
<a href="/login?return_to=%2Fsilvernode%2Fchill-script"
|
||||
class="btn btn-sm btn-with-count tooltipped tooltipped-n"
|
||||
aria-label="You must be signed in to watch a repository" rel="nofollow">
|
||||
<span class="octicon octicon-eye"></span>
|
||||
Watch
|
||||
</a>
|
||||
<a class="social-count" href="/silvernode/chill-script/watchers">
|
||||
1
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/login?return_to=%2Fsilvernode%2Fchill-script"
|
||||
class="btn btn-sm btn-with-count tooltipped tooltipped-n"
|
||||
aria-label="You must be signed in to star a repository" rel="nofollow">
|
||||
<span class="octicon octicon-star"></span>
|
||||
Star
|
||||
</a>
|
||||
|
||||
<a class="social-count js-social-count" href="/silvernode/chill-script/stargazers">
|
||||
0
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/login?return_to=%2Fsilvernode%2Fchill-script"
|
||||
class="btn btn-sm btn-with-count tooltipped tooltipped-n"
|
||||
aria-label="You must be signed in to fork a repository" rel="nofollow">
|
||||
<span class="octicon octicon-repo-forked"></span>
|
||||
Fork
|
||||
</a>
|
||||
<a href="/silvernode/chill-script/network" class="social-count">
|
||||
0
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h1 itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="entry-title public">
|
||||
<span class="mega-octicon octicon-repo"></span>
|
||||
<span class="author"><a href="/silvernode" class="url fn" itemprop="url" rel="author"><span itemprop="title">silvernode</span></a></span><!--
|
||||
--><span class="path-divider">/</span><!--
|
||||
--><strong><a href="/silvernode/chill-script" class="js-current-repository" data-pjax="#js-repo-pjax-container">chill-script</a></strong>
|
||||
|
||||
<span class="page-context-loader">
|
||||
<img alt="" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
|
||||
</span>
|
||||
|
||||
</h1>
|
||||
</div><!-- /.container -->
|
||||
</div><!-- /.repohead -->
|
||||
|
||||
<div class="container">
|
||||
<div class="repository-with-sidebar repo-container new-discussion-timeline ">
|
||||
<div class="repository-sidebar clearfix">
|
||||
|
||||
<nav class="sunken-menu repo-nav js-repo-nav js-sidenav-container-pjax js-octicon-loaders"
|
||||
role="navigation"
|
||||
data-pjax="#js-repo-pjax-container"
|
||||
data-issue-count-url="/silvernode/chill-script/issues/counts">
|
||||
<ul class="sunken-menu-group">
|
||||
<li class="tooltipped tooltipped-w" aria-label="Code">
|
||||
<a href="/silvernode/chill-script" aria-label="Code" class="selected js-selected-navigation-item sunken-menu-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /silvernode/chill-script">
|
||||
<span class="octicon octicon-code"></span> <span class="full-word">Code</span>
|
||||
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
|
||||
</a> </li>
|
||||
|
||||
<li class="tooltipped tooltipped-w" aria-label="Issues">
|
||||
<a href="/silvernode/chill-script/issues" aria-label="Issues" class="js-selected-navigation-item sunken-menu-item" data-hotkey="g i" data-selected-links="repo_issues repo_labels repo_milestones /silvernode/chill-script/issues">
|
||||
<span class="octicon octicon-issue-opened"></span> <span class="full-word">Issues</span>
|
||||
<span class="js-issue-replace-counter"></span>
|
||||
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
|
||||
</a> </li>
|
||||
|
||||
<li class="tooltipped tooltipped-w" aria-label="Pull requests">
|
||||
<a href="/silvernode/chill-script/pulls" aria-label="Pull requests" class="js-selected-navigation-item sunken-menu-item" data-hotkey="g p" data-selected-links="repo_pulls /silvernode/chill-script/pulls">
|
||||
<span class="octicon octicon-git-pull-request"></span> <span class="full-word">Pull requests</span>
|
||||
<span class="js-pull-replace-counter"></span>
|
||||
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
|
||||
</a> </li>
|
||||
|
||||
</ul>
|
||||
<div class="sunken-menu-separator"></div>
|
||||
<ul class="sunken-menu-group">
|
||||
|
||||
<li class="tooltipped tooltipped-w" aria-label="Pulse">
|
||||
<a href="/silvernode/chill-script/pulse" aria-label="Pulse" class="js-selected-navigation-item sunken-menu-item" data-selected-links="pulse /silvernode/chill-script/pulse">
|
||||
<span class="octicon octicon-pulse"></span> <span class="full-word">Pulse</span>
|
||||
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
|
||||
</a> </li>
|
||||
|
||||
<li class="tooltipped tooltipped-w" aria-label="Graphs">
|
||||
<a href="/silvernode/chill-script/graphs" aria-label="Graphs" class="js-selected-navigation-item sunken-menu-item" data-selected-links="repo_graphs repo_contributors /silvernode/chill-script/graphs">
|
||||
<span class="octicon octicon-graph"></span> <span class="full-word">Graphs</span>
|
||||
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
|
||||
</a> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
<div class="only-with-full-nav">
|
||||
|
||||
<div class="clone-url open"
|
||||
data-protocol-type="http"
|
||||
data-url="/users/set_protocol?protocol_selector=http&protocol_type=clone">
|
||||
<h3><span class="text-emphasized">HTTPS</span> clone URL</h3>
|
||||
<div class="input-group js-zeroclipboard-container">
|
||||
<input type="text" class="input-mini input-monospace js-url-field js-zeroclipboard-target"
|
||||
value="https://github.com/silvernode/chill-script.git" readonly="readonly">
|
||||
<span class="input-group-button">
|
||||
<button aria-label="Copy to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="clone-url "
|
||||
data-protocol-type="subversion"
|
||||
data-url="/users/set_protocol?protocol_selector=subversion&protocol_type=clone">
|
||||
<h3><span class="text-emphasized">Subversion</span> checkout URL</h3>
|
||||
<div class="input-group js-zeroclipboard-container">
|
||||
<input type="text" class="input-mini input-monospace js-url-field js-zeroclipboard-target"
|
||||
value="https://github.com/silvernode/chill-script" readonly="readonly">
|
||||
<span class="input-group-button">
|
||||
<button aria-label="Copy to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p class="clone-options">You can clone with
|
||||
<a href="#" class="js-clone-selector" data-protocol="http">HTTPS</a> or <a href="#" class="js-clone-selector" data-protocol="subversion">Subversion</a>.
|
||||
<a href="https://help.github.com/articles/which-remote-url-should-i-use" class="help tooltipped tooltipped-n" aria-label="Get help on which URL is right for you.">
|
||||
<span class="octicon octicon-question"></span>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="/silvernode/chill-script/archive/master.zip"
|
||||
class="btn btn-sm sidebar-button"
|
||||
aria-label="Download the contents of silvernode/chill-script as a zip file"
|
||||
title="Download the contents of silvernode/chill-script as a zip file"
|
||||
rel="nofollow">
|
||||
<span class="octicon octicon-cloud-download"></span>
|
||||
Download ZIP
|
||||
</a>
|
||||
</div>
|
||||
</div><!-- /.repository-sidebar -->
|
||||
|
||||
<div id="js-repo-pjax-container" class="repository-content context-loader-container" data-pjax-container>
|
||||
|
||||
|
||||
|
||||
<a href="/silvernode/chill-script/blob/82a820324d12536a7f99a9824fae8f39be17d605/chill.sh" class="hidden js-permalink-shortcut" data-hotkey="y">Permalink</a>
|
||||
|
||||
<!-- blob contrib key: blob_contributors:v21:c04aea16ef6ec019bee6c3ed148bca60 -->
|
||||
|
||||
<div class="file-navigation js-zeroclipboard-container">
|
||||
|
||||
<div class="select-menu js-menu-container js-select-menu left">
|
||||
<span class="btn btn-sm select-menu-button js-menu-target css-truncate" data-hotkey="w"
|
||||
data-master-branch="master"
|
||||
data-ref="master"
|
||||
title="master"
|
||||
role="button" aria-label="Switch branches or tags" tabindex="0" aria-haspopup="true">
|
||||
<span class="octicon octicon-git-branch"></span>
|
||||
<i>branch:</i>
|
||||
<span class="js-select-button css-truncate-target">master</span>
|
||||
</span>
|
||||
|
||||
<div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax aria-hidden="true">
|
||||
|
||||
<div class="select-menu-modal">
|
||||
<div class="select-menu-header">
|
||||
<span class="select-menu-title">Switch branches/tags</span>
|
||||
<span class="octicon octicon-x js-menu-close" role="button" aria-label="Close"></span>
|
||||
</div>
|
||||
|
||||
<div class="select-menu-filters">
|
||||
<div class="select-menu-text-filter">
|
||||
<input type="text" aria-label="Filter branches/tags" id="context-commitish-filter-field" class="js-filterable-field js-navigation-enable" placeholder="Filter branches/tags">
|
||||
</div>
|
||||
<div class="select-menu-tabs">
|
||||
<ul>
|
||||
<li class="select-menu-tab">
|
||||
<a href="#" data-tab-filter="branches" data-filter-placeholder="Filter branches/tags" class="js-select-menu-tab">Branches</a>
|
||||
</li>
|
||||
<li class="select-menu-tab">
|
||||
<a href="#" data-tab-filter="tags" data-filter-placeholder="Find a tag…" class="js-select-menu-tab">Tags</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches">
|
||||
|
||||
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
|
||||
|
||||
|
||||
<a class="select-menu-item js-navigation-item js-navigation-open selected"
|
||||
href="/silvernode/chill-script/blob/master/chill.sh"
|
||||
data-name="master"
|
||||
data-skip-pjax="true"
|
||||
rel="nofollow">
|
||||
<span class="select-menu-item-icon octicon octicon-check"></span>
|
||||
<span class="select-menu-item-text css-truncate-target" title="master">
|
||||
master
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="select-menu-no-results">Nothing to show</div>
|
||||
</div>
|
||||
|
||||
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags">
|
||||
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="select-menu-no-results">Nothing to show</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group right">
|
||||
<a href="/silvernode/chill-script/find/master"
|
||||
class="js-show-file-finder btn btn-sm empty-icon tooltipped tooltipped-s"
|
||||
data-pjax
|
||||
data-hotkey="t"
|
||||
aria-label="Quickly jump between files">
|
||||
<span class="octicon octicon-list-unordered"></span>
|
||||
</a>
|
||||
<button aria-label="Copy file path to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="breadcrumb js-zeroclipboard-target">
|
||||
<span class='repo-root js-repo-root'><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/silvernode/chill-script" class="" data-branch="master" data-direction="back" data-pjax="true" itemscope="url"><span itemprop="title">chill-script</span></a></span></span><span class="separator">/</span><strong class="final-path">chill.sh</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="commit file-history-tease">
|
||||
<div class="file-history-tease-header">
|
||||
<img alt="@silvernode" class="avatar" data-user="401972" height="24" src="https://avatars3.githubusercontent.com/u/401972?v=3&s=48" width="24" />
|
||||
<span class="author"><a href="/silvernode" rel="author">silvernode</a></span>
|
||||
<time datetime="2015-05-16T10:12:46Z" is="relative-time">May 16, 2015</time>
|
||||
<div class="commit-title">
|
||||
<a href="/silvernode/chill-script/commit/82a820324d12536a7f99a9824fae8f39be17d605" class="message" data-pjax="true" title="first commit">first commit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="participation">
|
||||
<p class="quickstat">
|
||||
<a href="#blob_contributors_box" rel="facebox">
|
||||
<strong>1</strong>
|
||||
contributor
|
||||
</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div id="blob_contributors_box" style="display:none">
|
||||
<h2 class="facebox-header">Users who have contributed to this file</h2>
|
||||
<ul class="facebox-user-list">
|
||||
<li class="facebox-user-list-item">
|
||||
<img alt="@silvernode" data-user="401972" height="24" src="https://avatars3.githubusercontent.com/u/401972?v=3&s=48" width="24" />
|
||||
<a href="/silvernode">silvernode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="file">
|
||||
<div class="file-header">
|
||||
<div class="file-actions">
|
||||
|
||||
<div class="btn-group">
|
||||
<a href="/silvernode/chill-script/raw/master/chill.sh" class="btn btn-sm " id="raw-url">Raw</a>
|
||||
<a href="/silvernode/chill-script/blame/master/chill.sh" class="btn btn-sm js-update-url-with-hash">Blame</a>
|
||||
<a href="/silvernode/chill-script/commits/master/chill.sh" class="btn btn-sm " rel="nofollow">History</a>
|
||||
</div>
|
||||
|
||||
|
||||
<button type="button" class="octicon-btn disabled tooltipped tooltipped-n" aria-label="You must be signed in to make or propose changes">
|
||||
<span class="octicon octicon-pencil"></span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="octicon-btn octicon-btn-danger disabled tooltipped tooltipped-n" aria-label="You must be signed in to make or propose changes">
|
||||
<span class="octicon octicon-trashcan"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="file-info">
|
||||
<span class="file-mode" title="File mode">executable file</span>
|
||||
<span class="file-info-divider"></span>
|
||||
46 lines (33 sloc)
|
||||
<span class="file-info-divider"></span>
|
||||
0.59 kb
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="blob-wrapper data type-shell">
|
||||
<table class="highlight tab-size-8 js-file-line-container">
|
||||
<tr>
|
||||
<td id="L1" class="blob-num js-line-number" data-line-number="1"></td>
|
||||
<td id="LC1" class="blob-code blob-code-inner js-file-line"><span class="pl-c">#!/bin/bash</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L2" class="blob-num js-line-number" data-line-number="2"></td>
|
||||
<td id="LC2" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L3" class="blob-num js-line-number" data-line-number="3"></td>
|
||||
<td id="LC3" class="blob-code blob-code-inner js-file-line">CHILLTIME=1 <span class="pl-c"># Minutes between bong hits</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L4" class="blob-num js-line-number" data-line-number="4"></td>
|
||||
<td id="LC4" class="blob-code blob-code-inner js-file-line">BONGTIME=1 <span class="pl-c"># Minutes during bong hits</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L5" class="blob-num js-line-number" data-line-number="5"></td>
|
||||
<td id="LC5" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L6" class="blob-num js-line-number" data-line-number="6"></td>
|
||||
<td id="LC6" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L7" class="blob-num js-line-number" data-line-number="7"></td>
|
||||
<td id="LC7" class="blob-code blob-code-inner js-file-line"><span class="pl-en">chillCount</span>(){</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L8" class="blob-num js-line-number" data-line-number="8"></td>
|
||||
<td id="LC8" class="blob-code blob-code-inner js-file-line"> clear</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L9" class="blob-num js-line-number" data-line-number="9"></td>
|
||||
<td id="LC9" class="blob-code blob-code-inner js-file-line"> secs=<span class="pl-s"><span class="pl-pds">$((</span> <span class="pl-smi">${CHILLTIME}</span> <span class="pl-k">*</span> <span class="pl-c1">60</span><span class="pl-pds">))</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L10" class="blob-num js-line-number" data-line-number="10"></td>
|
||||
<td id="LC10" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">echo</span> <span class="pl-s"><span class="pl-pds">"</span>(-_-)<span class="pl-pds">"</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L11" class="blob-num js-line-number" data-line-number="11"></td>
|
||||
<td id="LC11" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">echo</span> <span class="pl-s"><span class="pl-pds">"</span>Seconds until next bong hit<span class="pl-pds">"</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L12" class="blob-num js-line-number" data-line-number="12"></td>
|
||||
<td id="LC12" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">while</span> [ <span class="pl-smi">$secs</span> -gt 0 ]<span class="pl-k">;</span> <span class="pl-k">do</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L13" class="blob-num js-line-number" data-line-number="13"></td>
|
||||
<td id="LC13" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L14" class="blob-num js-line-number" data-line-number="14"></td>
|
||||
<td id="LC14" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">echo</span> -ne <span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">$secs</span>\033[0K\r<span class="pl-pds">"</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L15" class="blob-num js-line-number" data-line-number="15"></td>
|
||||
<td id="LC15" class="blob-code blob-code-inner js-file-line"> sleep 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L16" class="blob-num js-line-number" data-line-number="16"></td>
|
||||
<td id="LC16" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">:</span> <span class="pl-s"><span class="pl-pds">$((</span>secs<span class="pl-k">--</span><span class="pl-pds">))</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L17" class="blob-num js-line-number" data-line-number="17"></td>
|
||||
<td id="LC17" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">done</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L18" class="blob-num js-line-number" data-line-number="18"></td>
|
||||
<td id="LC18" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L19" class="blob-num js-line-number" data-line-number="19"></td>
|
||||
<td id="LC19" class="blob-code blob-code-inner js-file-line">}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L20" class="blob-num js-line-number" data-line-number="20"></td>
|
||||
<td id="LC20" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L21" class="blob-num js-line-number" data-line-number="21"></td>
|
||||
<td id="LC21" class="blob-code blob-code-inner js-file-line"><span class="pl-en">bongCount</span>(){</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L22" class="blob-num js-line-number" data-line-number="22"></td>
|
||||
<td id="LC22" class="blob-code blob-code-inner js-file-line"> clear</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L23" class="blob-num js-line-number" data-line-number="23"></td>
|
||||
<td id="LC23" class="blob-code blob-code-inner js-file-line"> secs=<span class="pl-s"><span class="pl-pds">$((</span> <span class="pl-smi">${BONGTIME}</span> <span class="pl-k">*</span> <span class="pl-c1">60</span><span class="pl-pds">))</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L24" class="blob-num js-line-number" data-line-number="24"></td>
|
||||
<td id="LC24" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">echo</span> <span class="pl-s"><span class="pl-pds">"</span>(-_-)<span class="pl-pds">"</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L25" class="blob-num js-line-number" data-line-number="25"></td>
|
||||
<td id="LC25" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L26" class="blob-num js-line-number" data-line-number="26"></td>
|
||||
<td id="LC26" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">echo</span> <span class="pl-s"><span class="pl-pds">"</span>Seconds until next chill period<span class="pl-pds">"</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L27" class="blob-num js-line-number" data-line-number="27"></td>
|
||||
<td id="LC27" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">while</span> [ <span class="pl-smi">$secs</span> -gt 0 ]<span class="pl-k">;</span> <span class="pl-k">do</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L28" class="blob-num js-line-number" data-line-number="28"></td>
|
||||
<td id="LC28" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L29" class="blob-num js-line-number" data-line-number="29"></td>
|
||||
<td id="LC29" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">echo</span> -ne <span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">$secs</span>\033[0K\r<span class="pl-pds">"</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L30" class="blob-num js-line-number" data-line-number="30"></td>
|
||||
<td id="LC30" class="blob-code blob-code-inner js-file-line"> sleep 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L31" class="blob-num js-line-number" data-line-number="31"></td>
|
||||
<td id="LC31" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">:</span> <span class="pl-s"><span class="pl-pds">$((</span>secs<span class="pl-k">--</span><span class="pl-pds">))</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L32" class="blob-num js-line-number" data-line-number="32"></td>
|
||||
<td id="LC32" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">done</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L33" class="blob-num js-line-number" data-line-number="33"></td>
|
||||
<td id="LC33" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L34" class="blob-num js-line-number" data-line-number="34"></td>
|
||||
<td id="LC34" class="blob-code blob-code-inner js-file-line">}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L35" class="blob-num js-line-number" data-line-number="35"></td>
|
||||
<td id="LC35" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L36" class="blob-num js-line-number" data-line-number="36"></td>
|
||||
<td id="LC36" class="blob-code blob-code-inner js-file-line"><span class="pl-en">main</span>(){</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L37" class="blob-num js-line-number" data-line-number="37"></td>
|
||||
<td id="LC37" class="blob-code blob-code-inner js-file-line"> clear</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L38" class="blob-num js-line-number" data-line-number="38"></td>
|
||||
<td id="LC38" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">while</span> <span class="pl-c1">true</span><span class="pl-k">;</span><span class="pl-k">do</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L39" class="blob-num js-line-number" data-line-number="39"></td>
|
||||
<td id="LC39" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L40" class="blob-num js-line-number" data-line-number="40"></td>
|
||||
<td id="LC40" class="blob-code blob-code-inner js-file-line"> chillCount</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L41" class="blob-num js-line-number" data-line-number="41"></td>
|
||||
<td id="LC41" class="blob-code blob-code-inner js-file-line"> bongCount</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L42" class="blob-num js-line-number" data-line-number="42"></td>
|
||||
<td id="LC42" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">done</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L43" class="blob-num js-line-number" data-line-number="43"></td>
|
||||
<td id="LC43" class="blob-code blob-code-inner js-file-line">}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L44" class="blob-num js-line-number" data-line-number="44"></td>
|
||||
<td id="LC44" class="blob-code blob-code-inner js-file-line">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="L45" class="blob-num js-line-number" data-line-number="45"></td>
|
||||
<td id="LC45" class="blob-code blob-code-inner js-file-line">main</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<a href="#jump-to-line" rel="facebox[.linejump]" data-hotkey="l" style="display:none">Jump to Line</a>
|
||||
<div id="jump-to-line" style="display:none">
|
||||
<form accept-charset="UTF-8" action="" class="js-jump-to-line-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
|
||||
<input class="linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line…" autofocus>
|
||||
<button type="submit" class="btn">Go</button>
|
||||
</form></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div><!-- /.repo-container -->
|
||||
<div class="modal-backdrop"></div>
|
||||
</div><!-- /.container -->
|
||||
</div><!-- /.site -->
|
||||
|
||||
|
||||
</div><!-- /.wrapper -->
|
||||
|
||||
<div class="container">
|
||||
<div class="site-footer" role="contentinfo">
|
||||
<ul class="site-footer-links right">
|
||||
<li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
|
||||
<li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
|
||||
<li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
|
||||
<li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
|
||||
<li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
|
||||
<li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<a href="https://github.com" aria-label="Homepage">
|
||||
<span class="mega-octicon octicon-mark-github" title="GitHub"></span>
|
||||
</a>
|
||||
<ul class="site-footer-links">
|
||||
<li>© 2015 <span title="0.03598s from github-fe128-cp1-prd.iad.github.net">GitHub</span>, Inc.</li>
|
||||
<li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
|
||||
<li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
|
||||
<li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
|
||||
<li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="fullscreen-overlay js-fullscreen-overlay" id="fullscreen_overlay">
|
||||
<div class="fullscreen-container js-suggester-container">
|
||||
<div class="textarea-wrap">
|
||||
<textarea name="fullscreen-contents" id="fullscreen-contents" class="fullscreen-contents js-fullscreen-contents" placeholder=""></textarea>
|
||||
<div class="suggester-container">
|
||||
<div class="suggester fullscreen-suggester js-suggester js-navigation-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fullscreen-sidebar">
|
||||
<a href="#" class="exit-fullscreen js-exit-fullscreen tooltipped tooltipped-w" aria-label="Exit Zen Mode">
|
||||
<span class="mega-octicon octicon-screen-normal"></span>
|
||||
</a>
|
||||
<a href="#" class="theme-switcher js-theme-switcher tooltipped tooltipped-w"
|
||||
aria-label="Switch themes">
|
||||
<span class="octicon octicon-color-mode"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ajax-error-message" class="flash flash-error">
|
||||
<span class="octicon octicon-alert"></span>
|
||||
<a href="#" class="octicon octicon-x flash-close js-ajax-error-dismiss" aria-label="Dismiss error"></a>
|
||||
Something went wrong with that request. Please try again.
|
||||
</div>
|
||||
|
||||
|
||||
<script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/frameworks-5c08de317e4054ec200d36d3b1361ddd3cb30c05c9070a9d72862ee28ab1d7f9.js"></script>
|
||||
<script async="async" crossorigin="anonymous" src="https://assets-cdn.github.com/assets/github/index-b79817a43c4618022b9ecd18dadd96010ccecbb12b56fcc232664db1f897e3a8.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
8
cleankernels
Executable file
8
cleankernels
Executable file
@ -0,0 +1,8 @@
|
||||
#/bin/bash
|
||||
ls /boot/ | grep vmlinuz | sed 's@vmlinuz-@linux-image-@g' | grep -v `uname -r` > /tmp/kernelList
|
||||
for I in `cat /tmp/kernelList`
|
||||
do
|
||||
aptitude remove $I
|
||||
done
|
||||
rm -f /tmp/kernelList
|
||||
update-grub
|
86
cpu_set_speed.sh
Executable file
86
cpu_set_speed.sh
Executable file
@ -0,0 +1,86 @@
|
||||
#!/bin/bash
|
||||
function main_menu
|
||||
{
|
||||
sudo clear
|
||||
cursetting=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
|
||||
getspd=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq)
|
||||
curspd=$(echo $getspd 1000000 | awk '{printf $1 / $2}')
|
||||
echo ""
|
||||
echo ""
|
||||
echo "-----------------CPU Settings---------------------"
|
||||
echo "1. Allow software to set CPU speed (UserSpace) setting."
|
||||
echo "2. Set CPU to Minimum (Powersave) setting."
|
||||
echo "3. Set CPU to Low (Conservative) setting."
|
||||
echo "4. Set CPU to Medium (OnDemand) setting."
|
||||
echo "5. Set CPU to High (Performance) setting."
|
||||
echo "6. View CPUID info string."
|
||||
echo "7. View Temperature sensor info string."
|
||||
echo "8. Exit."
|
||||
echo "--------------------------------------------------"
|
||||
echo " Current CPU Setting - "$cursetting;
|
||||
echo " Current CPU Speed - "$curspd"GHz";
|
||||
choice=9
|
||||
echo ""
|
||||
echo -e "Please enter your choice: \c"
|
||||
}
|
||||
|
||||
function press_enter
|
||||
{
|
||||
echo ""
|
||||
echo -n "Press Enter to continue."
|
||||
read
|
||||
main_menu
|
||||
}
|
||||
|
||||
main_menu
|
||||
while [ $choice -eq 9 ]; do
|
||||
read choice
|
||||
|
||||
if [ $choice -eq 1 ]; then
|
||||
echo userspace | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
|
||||
main_menu
|
||||
else
|
||||
if [ $choice -eq 2 ]; then
|
||||
echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
|
||||
main_menu
|
||||
else
|
||||
if [ $choice -eq 3 ]; then
|
||||
echo conservative | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
|
||||
main_menu
|
||||
else
|
||||
if [ $choice -eq 4 ]; then
|
||||
echo ondemand | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
|
||||
main_menu
|
||||
else
|
||||
if [ $choice -eq 5 ]; then
|
||||
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
|
||||
main_menu
|
||||
else
|
||||
if [ $choice -eq 6 ]; then
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
cpuid;
|
||||
press_enter
|
||||
else
|
||||
if [ $choice -eq 7 ]; then
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
sensors;
|
||||
press_enter
|
||||
else
|
||||
if [ $choice -eq 8 ]; then
|
||||
exit;
|
||||
else
|
||||
echo -e "Please enter the NUMBER of your choice: \c"
|
||||
choice=9
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
2
ddprogress
Executable file
2
ddprogress
Executable file
@ -0,0 +1,2 @@
|
||||
watch -n2 'sudo kill -USR1 $(pgrep ^dd)'
|
||||
|
4
desktop_icon_pos.sh
Executable file
4
desktop_icon_pos.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#! /bin/sh
|
||||
chattr +i ~/.config/xfce4/desktop/icons*
|
||||
sleep 40
|
||||
chattr -i ~/.config/xfce4/desktop/icons*
|
30
dogecoin-update-script.sh
Executable file
30
dogecoin-update-script.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
echo "Installing Dependencies"
|
||||
|
||||
sudo apt-get -y install libssl-dev libdb-dev libdb++-dev libqrencode-dev qt4-qmake libqtgui4 libqt4-dev libminiupnpc-dev libminiupnpc8 libboost1.53-all-dev build-essential git
|
||||
|
||||
cd /tmp
|
||||
|
||||
git clone https://github.com/dogecoin/dogecoin.git
|
||||
|
||||
cd dogecoin
|
||||
|
||||
sed -i 's/-mgw46-mt-sd-1_53//g' dogecoin-qt.pro
|
||||
|
||||
qmake USE_UPNP=- USE_QRCODE=0 USE_IPV6=0
|
||||
|
||||
make -j5
|
||||
|
||||
sudo install -Dm644 src/qt/res/icons/bitcoin.png /usr/share/pixmaps/dogecoin.png
|
||||
sudo install -Dm755 dogecoin-qt /usr/bin
|
||||
|
||||
wget http://scripts.homebutter.com/dogecoin.desktop
|
||||
|
||||
sudo install -Dm644 dogecoin.desktop /usr/share/applications/dogecoin.desktop
|
||||
|
||||
cd
|
||||
|
||||
sudo rm -r /tmp/dogecoin
|
||||
|
43
flash_fix
Executable file
43
flash_fix
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
sudo apt-get install devilspie
|
||||
|
||||
mkdir -p ~/.devilspie
|
||||
|
||||
echo '(if
|
||||
(or
|
||||
(is (application_name) "plugin-container")
|
||||
(and
|
||||
(contains application_name) "chromium-browser")
|
||||
(contains application_name) "flash-plugin")
|
||||
)
|
||||
)
|
||||
(begin
|
||||
(focus)
|
||||
)
|
||||
)' > ~/.devilspie/flash_fullscreen.ds
|
||||
|
||||
echo '#!/bin/bash
|
||||
|
||||
echo "running" > /home/maarten/devilspie.log
|
||||
|
||||
while [ true ]; do
|
||||
/usr/bin/devilspie;
|
||||
done' > ~/.devilspie/devilspie_daemon.sh
|
||||
|
||||
chmod a+x ~/.devilspie/devilspie_daemon.sh
|
||||
|
||||
mkdir -p ~/.config/autostart
|
||||
|
||||
echo '[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=/home/maarten/.devilspie/devilspie_daemon.sh
|
||||
Hidden=false
|
||||
X-GNOME-Autostart-enabled=true
|
||||
Name[en_US]=Devilspie Daemon
|
||||
Name=Devilspie Daemon
|
||||
Comment[en_US]=Script will continuously restart devilspie if stopped
|
||||
Comment=Script will continuously restart devilspie if stopped
|
||||
' > ~/.config/autostart/devilspie_daemon.desktop
|
13
give_mem
Executable file
13
give_mem
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# Free unused memory
|
||||
|
||||
flush_mem () {
|
||||
sudo sync
|
||||
echo 3 | sudo tee /proc/sys/vm/drop_caches
|
||||
}
|
||||
|
||||
echo -e "\nMemory usage before purge:\n" && free -m
|
||||
|
||||
flush_mem || exit && echo " Error purging memory"
|
||||
|
||||
echo -e "\nMemory usage after purge:\n" && free -m
|
3
icon_pos_save
Normal file
3
icon_pos_save
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
mkdir -p ~/.config/xfce4/desktop.bak
|
||||
cp -f ~/.config/xfce4/desktop/icons* ~/.config/xfce4/desktop.bak
|
106
idd.sh
Executable file
106
idd.sh
Executable file
@ -0,0 +1,106 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Paths
|
||||
MOUNTPATH="/mnt/mediadrive"
|
||||
DEVICEDIR="/dev"
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
LRED="\033[1;31m"
|
||||
BLUE="\033[0;34m"
|
||||
LBLUE="\033[1;34m"
|
||||
GREEN="\033[0;32m"
|
||||
LGREEN="\033[1;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
CYAN="\033[0;36m"
|
||||
LCYAN="\033[1;36m"
|
||||
PURPLE="\033[0;35m"
|
||||
LPURPLE="\033[1;35m"
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
printf "${LRED}This script must be run as root${NC}\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
|
||||
-d) if [ -f /usr/bin/pv ];then
|
||||
clear
|
||||
|
||||
printf "${LCYAN}idd - interactive dd${NC}\n"
|
||||
printf "${LPURPLE}********************************${NC}\n"
|
||||
echo
|
||||
printf "${LGREEN}Image files (img, iso) in ${2}${NC}\n"
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
|
||||
find $2 -regex ".*\.\(img\|iso\)" | grep [.iso,.img]
|
||||
if [ ! $? = 0 ];then
|
||||
printf "${LRED}No image files found${NC}\n"
|
||||
fi
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
|
||||
printf "${YELLOW}Copy & paste full file path here: ${NC}"
|
||||
read filepath
|
||||
|
||||
clear
|
||||
printf "${LGREEN}List of DEVICES in ${DEVICEDIR}/${NC}\n"
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
lsblk
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
echo
|
||||
printf "${YELLOW}Enter name of device${NC} (${LCYAN}example${NC}, ${LBLUE}sdb${NC}): "
|
||||
read devname
|
||||
|
||||
echo
|
||||
|
||||
printf "${YELLOW}Writing${NC} ${LGREEN}${filepath}${NC} to ${LGREEN}/dev/${devname}${NC}\n"
|
||||
printf "${LCYAN}Please wait ...${NC}\n"
|
||||
echo
|
||||
dd if=${filepath} | pv | dd of=${DEVICEDIR}/${devname};sync
|
||||
printf "${LGREEN}Done writing file${NC}\n"
|
||||
else
|
||||
echo "${0}: Please install 'pv' with your package manager"
|
||||
fi
|
||||
;;
|
||||
|
||||
*) if [ -f /usr/bin/pv ];then
|
||||
clear
|
||||
|
||||
printf "${LCYAN}idd - interactive dd${NC}\n"
|
||||
printf "${LPURPLE}********************************${NC}\n"
|
||||
echo
|
||||
printf "${LGREEN}Image files (img, iso) in ${HOME}${NC}\n"
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
|
||||
find ${HOME} -regex ".*\.\(img\|iso\)" | grep [.iso,.img]
|
||||
if [ ! $? = 0 ];then
|
||||
printf "${LRED}No image files found${NC}\n"
|
||||
fi
|
||||
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
|
||||
printf "${YELLOW}Copy & paste full file path here: ${NC}"
|
||||
read filepath
|
||||
|
||||
clear
|
||||
printf "${LGREEN}List of DEVICES in ${DEVICEDIR}/${NC}\n"
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
lsblk
|
||||
printf "${LBLUE}-------------------------------------------${NC}\n"
|
||||
echo
|
||||
printf "${YELLOW}Enter name of device${NC} (${LCYAN}example${NC}, ${LBLUE}sdb${NC}): "
|
||||
read devname
|
||||
|
||||
echo
|
||||
|
||||
printf "${YELLOW}Writing${NC} ${LGREEN}${filepath}${NC} to ${LGREEN}/dev/${devname}${NC}\n"
|
||||
printf "${LCYAN}Please wait ...${NC}\n"
|
||||
echo
|
||||
dd if=${filepath} | pv | dd of=${DEVICEDIR}/${devname};sync
|
||||
printf "${LGREEN}Done writing file${NC}\n"
|
||||
else
|
||||
echo "${0}: pv command not found in /usr/bin"
|
||||
fi
|
||||
;;
|
||||
esac
|
7
ip
Executable file
7
ip
Executable file
@ -0,0 +1,7 @@
|
||||
echo Public IP
|
||||
curl -s icanhazip.com
|
||||
echo
|
||||
echo Local IP
|
||||
/sbin/ifconfig enp5s0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'
|
||||
|
||||
|
5
ip.bak
Executable file
5
ip.bak
Executable file
@ -0,0 +1,5 @@
|
||||
echo Public IP-
|
||||
curl -s icanhazip.com
|
||||
echo
|
||||
echo Local IP-
|
||||
ifconfig | grep "inet" | grep "broadcast" | awk '{print $2}'
|
7
ip.sh
Executable file
7
ip.sh
Executable file
@ -0,0 +1,7 @@
|
||||
echo Public IP
|
||||
dig +short myip.opendns.com @resolver1.opendns.com
|
||||
echo
|
||||
echo Local IP
|
||||
/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'
|
||||
|
||||
|
1
jitty-scripts
Submodule
1
jitty-scripts
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 7760daf87c285a704829b7542e0c7bdc6a6ae990
|
1
kill_chrome
Executable file
1
kill_chrome
Executable file
@ -0,0 +1 @@
|
||||
sudo killall chromium-browser
|
4
kill_kodi
Executable file
4
kill_kodi
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
killall kodi.bin
|
||||
#ps aux | grep -i kodi | awk '{print $2}' | xargs sudo kill -9
|
||||
|
2
lightdmresolutionfix.sh
Executable file
2
lightdmresolutionfix.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
xrandr --output HDMI1 --primary --mode 1920x1080
|
217
lightson
Executable file
217
lightson
Executable file
@ -0,0 +1,217 @@
|
||||
#!/bin/bash
|
||||
# lightsOn.sh
|
||||
|
||||
# Copyright (c) 2011 iye.cba at gmail com
|
||||
# url: https://github.com/iye/lightsOn
|
||||
# This script is licensed under GNU GPL version 2.0 or above
|
||||
|
||||
# Description: Bash script that prevents the screensaver and display power
|
||||
# management (DPMS) to be activated when you are watching Flash Videos
|
||||
# fullscreen on Firefox and Chromium.
|
||||
# Can detect mplayer and VLC when they are fullscreen too but I have disabled
|
||||
# this by default.
|
||||
# lightsOn.sh needs xscreensaver, kscreensaver or gnome-screensaver to work.
|
||||
|
||||
# HOW TO USE: Start the script with the number of seconds you want the checks ./lightsOn.sh 590 &
|
||||
# for fullscreen to be done. Example:
|
||||
# "./lightsOn.sh 120 &" will Check every 120 seconds if Mplayer,
|
||||
# VLC, Firefox or Chromium are fullscreen and delay screensaver and Power Management if so.
|
||||
# You want the number of seconds to be ~10 seconds less than the time it takes
|
||||
# your screensaver or Power Management to activate.
|
||||
# If you don't pass an argument, the checks are done every 50 seconds.
|
||||
|
||||
|
||||
# Modify these variables if you want this script to detect if Mplayer,
|
||||
# VLC or Firefox Flash Video are Fullscreen and disable
|
||||
# xscreensaver/kscreensaver/gnome-screensaver and PowerManagement.
|
||||
mplayer_detection=1
|
||||
vlc_detection=1
|
||||
firefox_flash_detection=1
|
||||
chromium_flash_detection=1
|
||||
html5_detection=0 #checks if the browser window is fullscreen; will disable the screensaver if the browser window is in fullscreen so it doesn't work correctly if you always use the browser (Firefox or Chromium) in fullscreen
|
||||
|
||||
|
||||
# YOU SHOULD NOT NEED TO MODIFY ANYTHING BELOW THIS LINE
|
||||
|
||||
|
||||
# enumerate all the attached screens
|
||||
displays=""
|
||||
while read id
|
||||
do
|
||||
displays="$displays $id"
|
||||
done< <(xvinfo | sed -n 's/^screen #\([0-9]\+\)$/\1/p')
|
||||
|
||||
# Detect screensaver been used (xscreensaver, kscreensaver, gnome-screensaver or none)
|
||||
if [ `pgrep -l xscreensaver | grep -wc xscreensaver` -ge 1 ];then
|
||||
screensaver=xscreensaver
|
||||
elif [ `pgrep -l gnome-screensav | grep -wc gnome-screensav` -ge 1 ];then
|
||||
screensaver=gnome-screensav
|
||||
elif [ `pgrep -l kscreensaver | grep -wc kscreensaver` -ge 1 ];then
|
||||
screensaver=kscreensaver
|
||||
else
|
||||
screensaver=None
|
||||
echo "No screensaver detected"
|
||||
fi
|
||||
|
||||
|
||||
checkFullscreen()
|
||||
{
|
||||
# loop through every display looking for a fullscreen window
|
||||
for display in $displays
|
||||
do
|
||||
#get id of active window and clean output
|
||||
activ_win_id=`DISPLAY=:0.${display} xprop -root _NET_ACTIVE_WINDOW`
|
||||
#activ_win_id=${activ_win_id#*# } #gives error if xprop returns extra ", 0x0" (happens on some distros)
|
||||
activ_win_id=${activ_win_id:40:9}
|
||||
|
||||
# Skip invalid window ids (commented as I could not reproduce a case
|
||||
# where invalid id was returned, plus if id invalid
|
||||
# isActivWinFullscreen will fail anyway.)
|
||||
#if [ "$activ_win_id" = "0x0" ]; then
|
||||
# continue
|
||||
#fi
|
||||
|
||||
# Check if Active Window (the foremost window) is in fullscreen state
|
||||
isActivWinFullscreen=`DISPLAY=:0.${display} xprop -id $activ_win_id | grep _NET_WM_STATE_FULLSCREEN`
|
||||
if [[ "$isActivWinFullscreen" = *NET_WM_STATE_FULLSCREEN* ]];then
|
||||
isAppRunning
|
||||
var=$?
|
||||
if [[ $var -eq 1 ]];then
|
||||
delayScreensaver
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# check if active windows is mplayer, vlc or firefox
|
||||
#TODO only window name in the variable activ_win_id, not whole line.
|
||||
#Then change IFs to detect more specifically the apps "<vlc>" and if process name exist
|
||||
|
||||
isAppRunning()
|
||||
{
|
||||
#Get title of active window
|
||||
activ_win_title=`xprop -id $activ_win_id | grep "WM_CLASS(STRING)"` # I used WM_NAME(STRING) before, WM_CLASS more accurate.
|
||||
|
||||
|
||||
|
||||
# Check if user want to detect Video fullscreen on Firefox, modify variable firefox_flash_detection if you dont want Firefox detection
|
||||
if [ $firefox_flash_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *unknown* || "$activ_win_title" = *plugin-container* ]];then
|
||||
# Check if plugin-container process is running
|
||||
flash_process=`pgrep -l plugin-containe | grep -wc plugin-containe`
|
||||
#(why was I using this line avobe? delete if pgrep -lc works ok)
|
||||
#flash_process=`pgrep -lc plugin-containe`
|
||||
if [[ $flash_process -ge 1 ]];then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Check if user want to detect Video fullscreen on Chromium, modify variable chromium_flash_detection if you dont want Chromium detection
|
||||
if [ $chromium_flash_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *exe* ]];then
|
||||
# Check if Chromium Flash process is running
|
||||
if [[ `pgrep -lfc "chromium-browser --type=plugin --plugin-path=/usr/lib/adobe-flashplugin"` -ge 1 || `pgrep -lfc "chromium-browser --type=plugin --plugin-path=/usr/lib/flashplugin-installer"` -ge 1 ]];then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#html5 (Firefox or Chromium full-screen)
|
||||
if [ $html5_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *chromium-browser* || "$activ_win_title" = *Firefox* ]];then
|
||||
#check if firefox or chromium is running.
|
||||
if [[ `pgrep -l firefox | grep -wc firefox` -ge 1 || `pgrep -l chromium-browse | grep -wc chromium-browse` -ge 1 ]]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#check if user want to detect mplayer fullscreen, modify variable mplayer_detection
|
||||
if [ $mplayer_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *mplayer* || "$activ_win_title" = *MPlayer* ]];then
|
||||
#check if mplayer is running.
|
||||
#mplayer_process=`pgrep -l mplayer | grep -wc mplayer`
|
||||
mplayer_process=`pgrep -lc mplayer`
|
||||
if [ $mplayer_process -ge 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Check if user want to detect vlc fullscreen, modify variable vlc_detection
|
||||
if [ $vlc_detection == 1 ];then
|
||||
if [[ "$activ_win_title" = *vlc* ]];then
|
||||
#check if vlc is running.
|
||||
#vlc_process=`pgrep -l vlc | grep -wc vlc`
|
||||
vlc_process=`pgrep -lc vlc`
|
||||
if [ $vlc_process -ge 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
delayScreensaver()
|
||||
{
|
||||
|
||||
# reset inactivity time counter so screensaver is not started
|
||||
if [ "$screensaver" == "xscreensaver" ]; then
|
||||
#This tells xscreensaver to pretend that there has just been user activity. This means that if the screensaver is active (the screen is blanked), then this command will cause the screen to un-blank as if there had been keyboard or mouse activity. If the screen is locked, then the password dialog will pop up first, as usual. If the screen is not blanked, then this simulated user activity will re-start the countdown (so, issuing the -deactivate command periodically is one way to prevent the screen from blanking.)
|
||||
xscreensaver-command -deactivate > /dev/null
|
||||
elif [ "$screensaver" == "gnome-screensav" ]; then
|
||||
dbus-send --session --type=method_call --dest=org.gnome.ScreenSaver --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.SimulateUserActivity > /dev/null
|
||||
elif [ "$screensaver" == "kscreensaver" ]; then
|
||||
qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity > /dev/null
|
||||
fi
|
||||
|
||||
|
||||
#Check if DPMS is on. If it is, deactivate and reactivate again. If it is not, do nothing.
|
||||
dpmsStatus=`xset -q | grep -ce 'DPMS is Enabled'`
|
||||
if [ $dpmsStatus == 1 ];then
|
||||
xset -dpms
|
||||
xset dpms
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
delay=$1
|
||||
|
||||
|
||||
# If argument empty, use 50 seconds as default.
|
||||
if [ -z "$1" ];then
|
||||
delay=50
|
||||
fi
|
||||
|
||||
|
||||
# If argument is not integer quit.
|
||||
if [[ $1 = *[^0-9]* ]]; then
|
||||
echo "The Argument \"$1\" is not valid, not an integer"
|
||||
echo "Please use the time in seconds you want the checks to repeat."
|
||||
echo "You want it to be ~10 seconds less than the time it takes your screensaver or DPMS to activate"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
while true
|
||||
do
|
||||
checkFullscreen
|
||||
sleep $delay
|
||||
done
|
||||
|
||||
|
||||
exit 0
|
||||
|
5
load_desktop_icon_pos.sh
Executable file
5
load_desktop_icon_pos.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
rm -rf ~/.config/xfce4/desktop
|
||||
mkdir -p ~/.config/xfce4/desktop
|
||||
cp -f ~/.config/xfce4/desktop.bak/icons* ~/.config/xfce4/desktop
|
||||
xfdesktop --reload 2> /dev/null
|
3
lockicons
Executable file
3
lockicons
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
sudo chattr +i ~/.config/xfce4/desktop/icons*
|
||||
notify-send "Icons Locked"
|
27
mkusb
Executable file
27
mkusb
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
echo -n "Input path to ISO file (full path starting with /): "
|
||||
read iso
|
||||
echo
|
||||
echo -n "Input thumb drive device (i.e /dev/sdx): "
|
||||
read device
|
||||
echo
|
||||
echo -n "Warning: This will wipe the contents of your thumb drive
|
||||
continue?(y/n): "
|
||||
read continue
|
||||
|
||||
|
||||
|
||||
if [ "$continue" = "y" ]
|
||||
then echo "Writing blocks to device, this may take several minutes..."
|
||||
sudo dd bs=4M if=$iso of=$device
|
||||
echo "Finished writing blocks to device!"
|
||||
exit 0;
|
||||
|
||||
|
||||
elif [ "$continue" = "n" ]
|
||||
then exit 0;
|
||||
|
||||
fi
|
8
monitor
Executable file
8
monitor
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
while [ 1=1 ]
|
||||
do
|
||||
clear
|
||||
sensors
|
||||
sleep 1
|
||||
done
|
24
mousemove
Normal file
24
mousemove
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
mousemovefile=/tmp/mousemove
|
||||
|
||||
if [ -f $mousemovefile ];
|
||||
then
|
||||
rm $mousemovefile
|
||||
notify-send "Mouse moves no more" -i /usr/share/icons/gnome/48x48/devices/display.png
|
||||
else
|
||||
notify-send "MouseMoves" -i /usr/share/icons/gnome/48x48/devices/display.png
|
||||
touch $mousemovefile
|
||||
sleep .1
|
||||
while [ -f $mousemovefile ]
|
||||
do
|
||||
xdotool mousemove --sync 1000 500
|
||||
xdotool click 1
|
||||
sleep 3
|
||||
xdotool mousemove_relative --sync 0 80
|
||||
xdotool click 1
|
||||
sleep 1
|
||||
done
|
||||
|
||||
elseif
|
||||
sudo killall mousemove
|
||||
fi
|
15
mousescreenlock
Normal file
15
mousescreenlock
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
mousescreenlockfile=/tmp/mousescreenlockfile
|
||||
|
||||
if [ -f $mousescreenlockfile ];
|
||||
then
|
||||
rm $mousescreenlockfile && killall mousescreenlock
|
||||
else
|
||||
touch $mousescreenlockfile
|
||||
sleep 5s
|
||||
while [ -f $mousescreenlockfile ]
|
||||
do
|
||||
# xdotool mousemove 1919 0;
|
||||
xscreensaver-command activate
|
||||
done
|
||||
fi
|
BIN
new_ip_script.tar.gz
Executable file
BIN
new_ip_script.tar.gz
Executable file
Binary file not shown.
5
performance.sh
Executable file
5
performance.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo sed -i 's/^GOVERNOR=.*/GOVERNOR="performance"/' /etc/init.d/cpufrequtils
|
||||
|
||||
exit
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user