Skip to content

Instantly share code, notes, and snippets.

using OpenTelemetry;
using OpenTelemetry.Logs;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
var appResourceBuilder = ResourceBuilder.CreateDefault()
.AddService(serviceName: Telemetry.ServiceName, serviceVersion: Telemetry.ServiceVersion);
@byt3bl33d3r
byt3bl33d3r / log4j_rce_check.py
Created December 10, 2021 06:02
Python script to detect if an HTTP server is potentially vulnerable to the log4j 0day RCE (https://www.lunasec.io/docs/blog/log4j-zero-day/)
#! /usr/bin/env python3
'''
Needs Requests (pip3 install requests)
Author: Marcello Salvati, Twitter: @byt3bl33d3r
License: DWTFUWANTWTL (Do What Ever the Fuck You Want With This License)
This should allow you to detect if something is potentially exploitable to the log4j 0day dropped on December 9th 2021.
@acolyer
acolyer / jessfraz.md
Created November 19, 2017 13:39
Containers, operating systems and other fun things from The Morning Paper
@tsaarni
tsaarni / README.md
Last active June 9, 2021 18:58
How to connect to Azure AKS Kubernetes node VM by SSH

How to connect to Azure AKS Kubernetes worker node by SSH

Nodes are not assigned public IP. If you have accessible VM in the same VNET as worker nodes, then you can use that VM as jump host and connect the worker via private IP.

Alternatively public IP can be assigned to a worker node. This readme shows how to do that.

Steps how to attach public IP to a worker node

find out the resource group that AKS created for the node VMs

@ryanbateman
ryanbateman / gist:5643826
Created May 24, 2013 14:17
Log out a Volley request as a curl command
private void logToCurlRequest(Request<?> request) {
StringBuilder builder = new StringBuilder();
builder.append("curl request: curl ");
builder.append("-X \"");
switch (request.getMethod()) {
case Method.POST:
builder.append("POST");
break;
case Method.GET:
builder.append("GET");
@eric1234
eric1234 / README.md
Last active March 26, 2024 06:17
Environment-based configuration for PHP

Purpose

Somewhat like dotenv but for PHP.

The goals is to remove all config scattered about in files and have one authoritative source for that config info.

Usage

@schakko
schakko / convert_multiple_svn_to_git.sh
Created June 5, 2012 10:13
Convert multiple SVN repositories with help of svn2git
#!/bin/bash
PATH_svn2git=~/svn2git/svn-all-fast-export
# path to account mapping. Must be in format "$svn-username $git-fullname <$git-email>"
PATH_account_map=~/svn2git/account-map
# layout template
PATH_template=~svn2git/standardlayout.rules
@avh4
avh4 / MyActivityUnitTest.java
Created December 9, 2011 09:36
how to make an ActivityUnitTestCase that depends on a ContentProvider use test databases
@Override
protected void setUp() throws Exception {
super.setUp();
// Create a Context for our content provider that will use the test.*
// database instead of the production database
final String filenamePrefix = "test.";
final RenamingDelegatingContext testDatabaseContext = new RenamingDelegatingContext(
getInstrumentation().getTargetContext(), getInstrumentation()
.getTargetContext(), filenamePrefix);