Skip to content

Instantly share code, notes, and snippets.

View u0m3's full-sized avatar

Radu Alexandru Popescu u0m3

  • Bucharest, Romania
View GitHub Profile
@gullyn
gullyn / flappy.html
Last active November 28, 2023 18:23
Flappy bird in 205 bytes (improved!)
<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>
#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
@alexellis
alexellis / docker-compose.yml
Created July 21, 2020 16:26
Hack on JavaScript for OpenFaaS using Docker Compose
# 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
@jazz-it
jazz-it / getmusic.sh
Last active October 23, 2021 17:30
Download a YouTube Playlist, extract audio in best quality with youtube-dl and normalize volume with r128gain (ReplayGain 2.0)
#!/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//\"}
@cdyk
cdyk / bytesinwasm.md
Last active February 12, 2021 06:53
Who to blame for the bytes in the WASM?

Who to blame for the bytes in the WASM?

Christopher Dyken

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.

$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 |
@SwitHak
SwitHak / 20190730-TLP-WHITE_URGENT11_VxWorks.MD
Last active June 5, 2020 08:12
Tracking vendors responses to URGENT/11 VxWorks vulnerabilities (Last updated: 2020-02-21 1019 UTC)

Advisory (URGENT/11)

UPDATE (2019-10-02 1241 UTC)

General

Armis released new information about the vulnerabilities scope. The vulnerabilities impact more RTOS than expected.

IP Stacks backstory

  • 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.
@3xocyte
3xocyte / adidns_records.py
Last active November 23, 2023 21:20
get /etc/hosts entries from ADIDNS
#!/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)
@LiveOverflow
LiveOverflow / AcoraidaMonicaGame.sol
Last active February 10, 2024 13:13
Acoraida Monica
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;
@mathieucaroff
mathieucaroff / sequenceView.py
Last active May 25, 2023 04:51
Create a (read only) slice without creating a copy of the given sequence.
# 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.