- decrypt.day
- IPA Archive
- AppCake
- Appdb(original + modified)
Discover gists
| #!/usr/bin/env python3 | |
| """ | |
| Expose Ollama models to LM Studio by symlinking its model files. | |
| NOTE: On Windows, you need to run this script with administrator privileges. | |
| """ | |
| import json | |
| import os | |
| from pathlib import Path |
One great feature of caddy-docker-proxy is that you can quickly define config rules with Docker Compose labels in each containers on the fly like Traefik, instead of at a centralized place. With this feature, we can define everything in compose files, and don't ever need to mess with a config file (Caddyfile or JSON).
Taking advantage of snippets, I created this docker-compose.yaml example so that you can quickly define routing rules and add authetication like Authelia with just 3 lines of labels below each docker container you use.
With this example, should not ever need to manually edit Caddyfile config.
When you add a new container, you just need to do this:
networks:| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>HTML Sudoku Board</title> | |
| <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> |
| shader_type spatial; | |
| float saturate(float x) | |
| { | |
| return clamp(x,0.0,1.0); | |
| } | |
| vec3 saturate3(vec3 x) | |
| { | |
| return clamp(x, vec3(0), vec3(1)); | |
| } |
DSA is no longer about solving random sheets or memorizing solutions. It’s about a clear, structured, and realistic approach from absolute beginner to interview-ready Candidate.
- How to start DSA from zero (even if you don’t know coding)
- When to focus on language basics vs DSA
- A 3-phase preparation strategy used by serious engineers
- Exact timelines for topics, patterns, and problem counts
- Why 300–400 problems ≠ success (and what actually matters)
DSA is no longer about solving random sheets or memorizing solutions. It’s about a clear, structured, and realistic approach from absolute beginner to interview-ready Candidate.
- How to start DSA from zero (even if you don’t know coding)
- When to focus on language basics vs DSA
- A 3-phase preparation strategy used by serious engineers
- Exact timelines for topics, patterns, and problem counts
- Why 300–400 problems ≠ success (and what actually matters)
| import Foundation | |
| extension Data { | |
| var prettyPrintedJSONString: NSString? { /// NSString gives us a nice sanitized debugDescription | |
| guard let object = try? JSONSerialization.jsonObject(with: self, options: []), | |
| let data = try? JSONSerialization.data(withJSONObject: object, options: [.prettyPrinted]), | |
| let prettyPrintedString = NSString(data: data, encoding: String.Encoding.utf8.rawValue) else { return nil } | |
| return prettyPrintedString | |
| } |
Despite the session cookie being SameSite=Strict, we can still CSRF a request to set the memo to contain an XSS payload, and the corresponding session cookie will be set (as part of a response to a top-level navigation). We can also stop the cookie from being overridden by cancelling the redirect to / (via hitting the redirect limit). The remaining part of the challenge is to actually send this cookie with a navigation request.
When the headless bot navigates to a page with page.goto(), the initiator is null, which is treated as same-site with the request URL. Adjacently, when a request is made in Chromium, if the initiator site and target site agree according to this prior check, then [SameSite=Strict cookies will be sent regardless of whether the chain of redirects to the target site included a cross-site redirect or not, by default](https://source.chromium.o