This file contains hidden or 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 | |
| # Link: http://aamnah.com | |
| # Description: Install script for Opencart 2.x on a Linux (Ubuntu/Debian) server | |
| ### | |
| # Color Reset | |
| Color_Off='\033[0m' # Text Reset |
This file contains hidden or 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
| <div id="time"></div> |
This file contains hidden or 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
| <!-- image --> | |
| <a href="javascript:play('dog')"><img src="img/dog.png"></img></a> | |
| <!-- link --> | |
| <a href="javascript:play('dog')">Dog</a> | |
| <!-- audio file --> | |
| <audio | |
| id="dog" | |
| src="media/dog.wav" |
This file contains hidden or 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
| # delete install folder | |
| if [ -d "install/" ]; then | |
| rm -rf install | |
| fi | |
| # To change all the directories to 755 (-rwxr-xr-x) | |
| find . -type d -exec chmod 755 {} \; | |
| # To change all the files to 644 (-rw-r--r--): | |
| find . -type f -exec chmod 644 {} \; |
This file contains hidden or 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 | |
| USER='BACKUPUSER' | |
| PASSWORD='PASSWORD' | |
| DIR='/backups/mysql' # don't use the trailing slash as it is used in the command | |
| # see `date --help` for format controls | |
| # %b = Jan | |
| # $H = hour (00..23) | |
| # %M = minute (00..59) |
This file contains hidden or 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
| # SOURCE: https://www.youtube.com/watch?v=t5laKVNJd8U | |
| # INSTALL: sudo apt-get install python3-picamera | |
| # the tutorial used a Pi NoIR camera | |
| # DOCS: https://www.raspberrypi.org/documentation/usage/camera/python/README.md | |
| import picamera | |
| # setup the camera such that it closes | |
| # when we are done with it | |
| print("About to take a picture. CHEESE!") |
This file contains hidden or 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 | |
| DATE=$(date +"%Y-%m-%d_%H%M") | |
| # TODO: if dir doen't exits mkdir | |
| fswebcam -r 1280x720 --no-banner /home/pi/webcam/$DATE.jpg | |
| # run: ./fswebcam.sh |
This file contains hidden or 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
| wifi.setmode(wifi.STATION) | |
| wifi.sta.config("SSID","password") | |
| print(wifi.sta.getip()) |
This file contains hidden or 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
| // Libs | |
| import {createStore} from 'redux' | |
| // STORE | |
| // .createStore(reducer, [preloadedState], [enhancer]) | |
| // .createStore(function(state, action) {}) | |
| // let's you create a store that holds the complete state tree of your app. there should only be a signle store in your app | |
| const store = createStore(function(state, action) { | |
| // make a change to the state based on the action |
This file contains hidden or 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
| const App = (props) => { | |
| return ( | |
| // code goes here | |
| <div> | |
| <p>My name is {props.name}. I am {props.age} years old.</p> | |
| </div> | |
| ) | |
| } |