Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Current Temp
FULLURL="http://www.accuweather.com/en/us/portland-or/97204/weather-forecast/350473"
# Trap/Temp Dir to attempt to be safe while parsing html with bash
TMPDIR=${TMPDIR:-/tmp}
temporary_dir=$(mktemp -d "$TMPDIR/XXXXXXXXXXXXXXXXXXXXXXXXXXXXX") || { echo "ERROR creating a temporary file" >&2; exit 1; }
trap 'rm -rf "$temporary_dir"' 0
trap 'exit 2' 1 2 3 15
#!/bin/bash
# Current Weather Icon
FULLURL="http://www.accuweather.com/en/us/portland-or/97204/weather-forecast/350473"
# Trap/Temp Dir to attempt to be safe while parsing html with bash
TMPDIR=${TMPDIR:-/tmp}
temporary_dir=$(mktemp -d "$TMPDIR/XXXXXXXXXXXXXXXXXXXXXXXXXXXXX") || { echo "ERROR creating a temporary file" >&2; exit 1; }
trap 'rm -rf "$temporary_dir"' 0
trap 'exit 2' 1 2 3 15
@pemby
pemby / shell
Last active August 29, 2015 13:56
acuweather_scraper.sh
#!/bin/bash
FULLURL="http://www.accuweather.com/en/us/portland-or/97204/weather-forecast/350473"
#local path for files
LOCATION="/Users/admini/accuFiles"
# temp/trap - attempting to be as safe as possible while parsing html in bash
TMPDIR=${TMPDIR:-/tmp}
temporary_dir=$(mktemp -d "$TMPDIR/XXXXXXXXXXXXXXXXXXXXXXXXXXXXX") || { echo "ERROR creating a temporary file" >&2; exit 1; }
@REM File to be deleted
SET FileToDelete="%AppData%\Mozilla\Firefox\Desktop Background.bmp"
@Try to delete the file only if it exists
IF EXIST %FileToDelete% del /F %FileToDelete%
fsutil file createnew "%AppData%\Mozilla\Firefox\Desktop Background.bmp" 0
attrib +r "%AppData%\Mozilla\Firefox\Desktop Background.bmp"
@pemby
pemby / WGU.CC.6.26.18.csv
Created June 26, 2018 23:49
WGU CC 6.26.18
CCN Course Number Course Description CUs Term
ACCT 2311 VYC1 Principles of Accounting 4 9
ACCT 2311 VYC1 Principles of Accounting 4 9
ACCT 2311 VYC1 Principles of Accounting 4 7
ACCT 2311 VYC1 Principles of Accounting 4 3
ACCT 3310 UFC1 Managerial Accounting 3 7
ACCT 3310 UFC1 Managerial Accounting 3 7
ACCT 3310 UFC1 Managerial Accounting 3 9
ACCT 3310 UFC1 Managerial Accounting 3 9
ACCT 3310 UFC1 Managerial Accounting 3 7
@pemby
pemby / index.html
Created February 24, 2020 23:45
math.js | basic usage math.js | basic usage // source https://jsbin.com/kuvogar/18
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="math.js | basic usage">
<title>math.js | basic usage</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/3.1.4/math.min.js"></script>
<style id="jsbin-css">
form {
overflow: hidden;
}
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Compute</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script type="text/javascript" id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
</script>
<script type="text/x-mathjax-config;executed=true">
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] } });
</script>
@pemby
pemby / index.html
Created February 25, 2020 22:21
youtube vertical playlist responsive
<div class="vid-main-wrapper clearfix">
<!-- THE YOUTUBE PLAYER -->
<div class="vid-container">
<iframe id="vid_frame" src="https://www.youtube.com/embed/cOSEOYi9JS4?rel=0&showinfo=0&autohide=1" frameborder="0" width="560" height="315"></iframe>
</div>
<!-- THE PLAYLIST -->
<div class="vid-list-container">
<ol id="vid-list">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
body {
margin: 30px;
padding: 0;
@pemby
pemby / index.html
Created February 25, 2020 22:52
VideoJS Playlist 2
<html>
<body>
<video id="playerOne" class="video-js vjs-default-skin" controls="controls" width="600px" crossorigin="anonymous"></video>
</body>
</html>