Recently, I've worked with Emscripten, producing web-assembly from C++. As a result, I've become curious of how much the wasm-binary grows by including this or that code. Even though caring about code size seems to be out of fashion since we stopped using floppy disks to move programs around, it does matter somewhat on the web, as every client has to download the binary, maybe over a cellular connection etc.
This file contains 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
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c> |
This file contains 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
#Somewhat stolen from PowerZure Get-AzureKeyVaultContent and Show-AzureKeyVaultContent , thanks hausec! | |
#reimplemented by Flangvik to run in a single "Azure PowerShell" Agent job, inside an DevOps Pipeline | |
#Suppress warnings for clean output | |
Set-Item Env:\SuppressAzurePowerShellBreakingChangeWarnings "true" | |
#Get all Azure KeyVaults from currently selected/scoped subscription | |
#This connection is known as an "Service connection",and in terms of accessing Azure resources, uses either Service principal or Managed identity | |
$vaults = Get-AzKeyVault |
This file contains 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
# Assume that you ran "faas-cli new --lang node12 api2" before starting with this file. | |
version: '3.3' | |
services: | |
api2: | |
build: | |
context: ./template/node12 | |
ports: | |
- 8000:3000 |
This file contains 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
#!/bin/bash | |
# helper function parameters: 0 or empty = print only, 1 = rename files! | |
renamemp3() { | |
local s="${1:-0}" | |
for f in *.mp3; do | |
if [[ "$f" == *[\"\`]* ]] | |
then | |
filename=${f%.*} | |
filename=${filename//\"} |
This file contains 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
$xlfile = "$env:TEMP\PSreports.xlsx" | |
Remove-Item $xlfile -ErrorAction SilentlyContinue | |
# Get-Process | |
$ecd = New-ExcelChartDefinition -XRange "A3:A7" -YRange "C3:C7" -Row 30 -Column 1 -Title "Report Process`nTotal Handles" -NoLegend | |
Get-Process | Select -First 5 | | |
Export-Excel $xlfile -AutoSize -StartRow 2 -TableName ReportProcess -ExcelChartDefinition $ecd | |
# Get-Service | |
Get-Service | Select -First 5 | |
Armis released new information about the vulnerabilities scope. The vulnerabilities impact more RTOS than expected.
- Some of the vulnerabilities discovered by Armis doesn't resides in VxWorks RTOS but in one part of it, the IP stack. This IP stack named IPNET stack comes from Interpeak AB, a company acquired by Wind River the editor of VxWorks RTOS, the 20th March 2006.
- Before been acquired by Wind River, the Interpeak AB company sold IP stacks to several customers of them. Interpeak AB sold 2 major IP stacks named IPNET & IPLITE, IPLITE is a light version of IPNET.
This file contains 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
#!/usr/bin/env python | |
import argparse | |
import sys | |
import binascii | |
import socket | |
import re | |
from ldap3 import Server, Connection, NTLM, ALL, SUBTREE, ALL_ATTRIBUTES | |
# get /etc/hosts entries for domain-joined computers from A and AAAA records (via LDAP/ADIDNS) (@3xocyte) |
This file contains 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
pragma solidity =0.4.25; | |
contract AcoraidaMonicaGame{ | |
uint256 public version = 4; | |
string public description = "Acoraida Monica admires smart guys, she'd like to pay 10000ETH to the one who could answer her question. Would it be you?"; | |
string public constant sampleQuestion = "Who is Acoraida Monica?"; | |
string public constant sampleAnswer = "$*!&#^[` a@.3;Ta&*T` R`<`~5Z`^5V You beat me! :D"; | |
Logger public constant logger=Logger(0x5e351bd4247f0526359fb22078ba725a192872f3); | |
address questioner; | |
string public question; |
This file contains 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
# stackoverflow.com/q/3485475/can-i-create-a-view-on-a-python-list | |
# This solution is based on python 3 range ability to be sliced and indexed | |
# in constant time. | |
# | |
# It supports slicing, equality comparsion, string casting, and reproducers, | |
# but doesn't support assigment (and I don't plan to add support for it). | |
# | |
# Creating a SliceableSequenceView of a SliceableSequenceView won't slow down | |
# access times as this case is detected. |
NewerOlder