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
| # Majority AI Generated (GPT-4) | |
| import time | |
| import subprocess | |
| import psutil | |
| import sys | |
| # Set the threshold for high network usage (in bytes per second) | |
| # 10MB | |
| HIGH_USAGE_THRESHOLD = 10000000 |
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
| # Python server with cors accepts incoming requests from the client and wakes pc | |
| from flask import Flask, jsonify, request | |
| from flask_cors import CORS | |
| from wakeonlan import send_magic_packet | |
| app = Flask(__name__) | |
| CORS(app) | |
| # run flask in prod mode | |
| app.config['ENV'] = 'production' |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <colorTheme id="24587" name="RainbowDrops" modified="2014-02-19 15:47:49" author="guari" website="https://github.com/guari/eclipse-ui-theme"> | |
| <searchResultIndication color="#D8D8D8" /> | |
| <filteredSearchResultIndication color="#D8D8D8" /> | |
| <occurrenceIndication color="#484848" /> | |
| <writeOccurrenceIndication color="#335A72" /> | |
| <findScope color="#1E789B" /> | |
| <deletionIndication color="#863C43" /> | |
| <sourceHoverBackground color="#444444" /> | |
| <singleLineComment color="#626262" /> |
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
| # A powershell to set the IP of your DynDNS enabled domain on namecheap | |
| $IP=(Invoke-WebRequest -uri "http://ifconfig.me/ip").Content | |
| echo ("Setting IP "+$IP+" for DynDNS") | |
| Invoke-WebRequest -uri ("https://dynamicdns.park-your-domain.com/update?host=home&domain=ryan-s.me&password=???&ip="+$IP) |
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
| # A command line utility to save all wlan networks dectected by your PC into a .csv file. | |
| # Only works on Windows (using the built in netsh tool) | |
| # Usage: python .\csv_netsh.py out.csv | |
| import sys | |
| from subprocess import Popen, PIPE | |
| def process_block(block, out_lines): | |
| ssid_name = block[0].split(':')[1].strip() |
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://raw.githubusercontent.com/HackMelbourne/find-a-friend/live-coding-session-1/src/pages/SignUp.js | |
| // Edited to include background image | |
| import React from "react"; | |
| import { | |
| AppBar, | |
| Avatar, | |
| Grid, | |
| Paper, | |
| Toolbar, | |
| TextField, |
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
| import React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import axios from 'axios'; | |
| import LoadingAnimation from "./LoadingAnimation"; | |
| import Plyr from 'plyr'; | |
| import Hls from 'hls.js'; | |
| import 'plyr/dist/plyr.css'; | |
| CloudflareSecureStream.propTypes = { | |
| videoId: PropTypes.string.isRequired, |
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
| import React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| //remove annoying custom stream tag error | |
| const realError = console.error; | |
| console.error = (...x) => { | |
| if (x[0].startsWith('Warning: The tag <%s> is unrecognized in this browser. ' + | |
| 'If you meant to render a React component, start its name with an uppercase letter.')) { | |
| console.log('Suppressing Stream Error...'); | |
| return; |