Skip to content

Instantly share code, notes, and snippets.

function main{
Add-Type -AssemblyName presentationframework
$html = [string]@"
<!DOCTYPE html>
<html>
<head>
<title>Hello, World!</title>
<script>
<!DOCTYPE html>
<html>
<head>
<title>Polyglot</title>
<hta:application applicationname="Polyglot" scroll="no" singleinstance="no" />
<script type="text/vbscript">
Sub Window_onLoad
window.resizeTo 250,250
End Sub
@andreburto
andreburto / clock.html
Last active August 23, 2020 23:19
Basic clock display
<!DOCTYPE html>
<html>
<head>
<title>Clock Widget 3</title>
<script>
var hour = 0;
var min = 0;
var sec = 0;
var year = 0;
var month = 0
<!DOCTYPE html>
<html>
<head>
<title>Weather Widget 1</title>
<script>
function getUrl() {
return "http://localhost:8080/scratch/weather.xml";
}
#!/usr/bin/perl -w
######################################################################
# skip_lines.pl -- skips selected lines of a given file
#
# perl skip_lines.pl /path/to/file.txt 1,3,4,5
# | | |
# script -----+ | |
# text file ---------------+ |
# comma separated line numbers ---------+
# with no spaces
<!DOCTYPE html>
<html>
<head>
<title>Calculator</title>
<script>
function checkSize() {
var html = document.documentElement;
var divC = document.getElementById("interface");
# Tomcat commands
Set-Variable -Name tomcat_path -Value "C:\path\to\apache-tomcat\bin\" -Scope global -Force
function start-tomcat {
$return_to = Get-Location
set-location -Path $tomcat_path
start-process .\startup.bat
Set-Location $return_to
}
' Credit where it is due:
' http://computerperformance.co.uk/
' https://msdn.microsoft.com/en-us/library/aa394372(v=vs.85).aspx
' ----------------------------------------------------------------------
Option Explicit
Dim objWMIService, objShell, objProcess
Dim strComputer, colProcess, procName, procPath
procName = "notepad++.exe"
strComputer = "."
@andreburto
andreburto / main.py
Last active August 8, 2020 01:41
gamer:bit + micro:bit = 5x5 canvas
MAX_B = 9
MAX_X = 5
MAX_Y = 5
b = MAX_B
x = 0
y = 0
d_s = [[0 for c in range(0, MAX_X)] for r in range(0, MAX_Y)]
@andreburto
andreburto / Dockerfile.uwsgi
Created August 30, 2020 01:43
nginx proxy for docker-compose
FROM python:3.7-alpine
WORKDIR /test-dock
# Install any needed packages specified in requirements.txt
RUN apk update && \
apk add --no-cache make gcc g++ libgcc libstdc++ libsodium musl libzmq zeromq-dev linux-headers python3-dev && \
pip install --upgrade pip && \
pip install requests beautifulsoup4 pymysql flask uwsgi && \
rm -Rf /tmp/* && \