git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| // Resizes a BMP file | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| int main(int argc, char *argv[]) |
| # compiler to use | |
| CC = clang | |
| # flags to pass compiler | |
| CFLAGS = -fsanitize=signed-integer-overflow -fsanitize=undefined -ggdb3 -O0 -Qunused-arguments -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wshadow |
| #!/bin/sh | |
| # the script takes one command line argument which is the name of the directory to watch for changes | |
| check() { | |
| dir="$1" | |
| chsum1=`find $dir -type f -mtime -5 -exec md5sum {} \;` | |
| chsum2=$chsum1 | |
| changed=false | |
| pushed=false | |
| declare -i waited | |
| waited=0 |
| #!/bin/sh | |
| # This script will make a backup of the databases | |
| username="<username>" | |
| password="<password>" | |
| host="<hostname>" | |
| dbname="<database name>" | |
| current_date=`date +"%Y-%m-%d-%T"` | |
| file_name="$dbname""_""$current_date" |
| #!/bin/sh | |
| # this script takes one command line argument which is the name of the directory to push changes from to git | |
| push() { | |
| dir="$1" | |
| cd $dir | |
| echo "pushing any changes to git once" | |
| git status | |
| git add . | |
| git commit -m "committing changes made on live server" | |
| git push origin master |
| #!/bin/sh | |
| # this script takes two command line arguments which is the name of the directory to count files in and number of files to keep in directory | |
| # must use full path to directory (i.e. /home/path_to_directory) as first argument | |
| # the script counts the number of files in the directory and if more than number to keep, extra files will be deleted | |
| # it will delete the oldest database files over the number to keep | |
| # ideal for deleting old copies of backup files. | |
| dir="$1" | |
| num_to_keep="$2" | |
| cd $dir | |
| shopt -s nullglob |
| // Get users search input and add it to form action | |
| $('#js-search-input').keypress(function (e) { | |
| let key = e.which; | |
| // if the key is the enter key code | |
| if(key === 13) { | |
| const userInput = $('#js-search-input').val(); | |
| console.log("user input: " + userInput); | |
| let actionStr = "/inquiries/search/" + userInput; | |
| console.log("actionStr = " + actionStr); | |
| actionStr = actionStr.replace('?', ''); |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream