This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################ | |
# CUSTOM MOTD FOR RASPBERRY PI | |
################################ | |
let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)" | |
let secs=$((${upSeconds}%60)) | |
let mins=$((${upSeconds}/60%60)) | |
let hours=$((${upSeconds}/3600%24)) | |
let days=$((${upSeconds}/86400)) | |
UPTIME=`printf "%d days, %02dh %02dm %02ds" "$days" "$hours" "$mins" "$secs"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################### | |
# Graph WLAN | |
############################################################### | |
dynamic.17.name=wifi_received | |
dynamic.17.source=/sys/class/net/wlan0/statistics/rx_bytes | |
dynamic.17.regexp=(.*) | |
dynamic.17.postprocess=$1*-1 | |
dynamic.17.rrd=DERIVE | |
dynamic.18.name=wifi_send |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Source: http://ubuntuforums.org/showthread.php?t=2106950 | |
#Check for root | |
true="true"true="true" | |
ROOT_UID=0 | |
overwrite="" | |
if [ "$UID" -ne "$ROOT_UID" ]; then | |
echo "Must be run as root, use sudo." | |
exit 0 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
####################################### | |
# Bash script to install an AMP stack and PHPMyAdmin plus tweaks. For Debian based systems. | |
# Written by @AamnahAkram from http://aamnah.com | |
# In case of any errors (e.g. MySQL) just re-run the script. Nothing will be re-installed except for the packages with errors. | |
####################################### | |
#COLORS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash/ | |
####################################### | |
# Bash script to install apps on a new system (Ubuntu) | |
# Written by @AamnahAkram from http://aamnah.com | |
####################################### | |
## Update packages and Upgrade system | |
sudo apt-get update -y | |
## Git ## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install Homebrew if you don't already have it: http://mxcl.github.io/homebrew/ | |
# On Mac, Homebrew with homebrew-dupes will allow you to easily upgrade nano to a newer version than the one that came with Mac OSX. | |
# [homebrew-dupes](https://github.com/Homebrew/homebrew-dupes): | |
# These formulae duplicate software provided by OS X, though may provide more recent or bugfix versions. | |
# Add the dupes formulae, then install a new version of nano. | |
brew tap homebrew/dupes | |
brew install nano |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color_green='\033[92m' | |
color_red='\033[91m' | |
color_off='\033[0m' | |
gruntfile() { | |
if [ -e "gruntfile.js" ] ; then | |
echo -e "${color_red}gruntfile.js already exists${color_off}" | |
if [ -e "Gruntfile.js" ] ; then | |
echo -e "${color_red}Gruntfile.js already exists${color_off}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Emmet: snippet>description+tabTrigger+content{<![CDATA[ ]]>} --> | |
<!-- Gruntfile.js --> | |
<snippet> | |
<description>Gruntfile.js Skeleton</description> | |
<tabTrigger>grunt</tabTrigger> | |
<content><![CDATA[ | |
module.exports = function(grunt) { | |
// Configure task(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Aamnah Akram | |
# URL: http://aamnah.com | |
# Email: hello@aamnah.com | |
# Description: Bash script for creating Grunt snippets for Sublime Text (gruntfile, cssmin, imagemin, uglify, s3, watch) | |
# Install: Open a Terminal and `cd` to the folder you downloaded the script in. | |
# Run the script by typing `bash grunt-snippets.sh`. It will add all the below snippets to the packages folder. | |
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Colors | |
Color_Off='\033[0m' # Color Reset | |
Red='\033[0;31m' # Red | |
Green='\033[0;32m' # Green | |
Yellow='\033[0;33m' # Yellow | |
Cyan='\033[0;36m' # Cyan | |
# Bold | |
BRed='\033[1;31m' # Red | |
BGreen='\033[1;32m' # Green |
OlderNewer