Skip to content

Instantly share code, notes, and snippets.

View george-thomas-hill's full-sized avatar

George Hill george-thomas-hill

View GitHub Profile
@george-thomas-hill
george-thomas-hill / index.html
Last active June 5, 2023 23:53
Testing Electron display of PDFs
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
</head>
<body>
@george-thomas-hill
george-thomas-hill / index.html
Last active October 22, 2022 18:17
Demonstrates that embedding PDFs using webviews and custom protocols crashes Electron.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; frame-src 'self' customprotocolname: ;">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@george-thomas-hill
george-thomas-hill / index.html
Created January 4, 2021 02:23 — forked from jonnyreeves/index.html
JavaScript Class Structure using requireJS. The following code shows you how to create a Class definition in one JavaScript file and then import it for use in another; coming from an ActionScript 3 background this (and some of JavaScript specific traits)
<!DOCTYPE html>
<html>
<head>
<script data-main="usage" src="http://requirejs.org/docs/release/1.0.8/comments/require.js"></script>
</head>
<body>
<p>Check your JavaScript console for output!</p>
</body>
</head>
@george-thomas-hill
george-thomas-hill / .bashrc
Created December 21, 2020 02:00
.bashrc for OSU student server
PS1="\n\w\n\n\\$ "
alias backupgh="tar -czvf gh.tar.gz gh --exclude=*node_modules* --exclude=*.git*"
alias psme='ps -o ppid,pid,euser,stat,%cpu,rss,args | head -n 1; ps -eH -o ppid,pid,euser,stat,%cpu,rss,args | grep hillge'
alias psall='ps -eH -o ppid,pid,euser,stat,%cpu,rss,args | less'
alias la='ls -la'