Skip to content

Instantly share code, notes, and snippets.

From self[at]sungpae.com Mon Nov 8 16:59:48 2021
Date: Mon, 8 Nov 2021 16:59:48 -0600
From: Sung Pae <self[at]sungpae.com>
To: security@docker.com
Subject: Permissive forwarding rule leads to unintentional exposure of
containers to external hosts
Message-ID: <YYmr4l1isfH9VQCn@SHANGRILA>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature"; boundary="QR1yLfEBO/zgxYVA"
@lschmierer
lschmierer / dark_fusion.py
Last active May 5, 2024 07:46 — forked from QuantumCD/Qt 5 Dark Fusion Palette
Qt5 Dark Fusion Palette for Python
qApp.setStyle("Fusion")
dark_palette = QPalette()
dark_palette.setColor(QPalette.Window, QColor(53, 53, 53))
dark_palette.setColor(QPalette.WindowText, Qt.white)
dark_palette.setColor(QPalette.Base, QColor(25, 25, 25))
dark_palette.setColor(QPalette.AlternateBase, QColor(53, 53, 53))
dark_palette.setColor(QPalette.ToolTipBase, Qt.white)
dark_palette.setColor(QPalette.ToolTipText, Qt.white)
@VAnsimov
VAnsimov / HostingView Example.swift
Last active May 5, 2024 07:43
SwiftUI View to UIView
import UIKit
import SwiftUI
// SwiftUI
struct SomeView: View {
var body: some View {
Text("Hello World!")
}
}
@br3ndonland
br3ndonland / github-actions-notes.md
Last active May 5, 2024 07:39
Getting the Gist of GitHub Actions
@kalomaze
kalomaze / modeling_mixtral.py
Created May 5, 2024 03:38
Fixed Mixtral training code for HF Transformers
# coding=utf-8
# Copyright 2023 Mixtral AI and the HuggingFace Inc. team. All rights reserved.
#
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
# and OPT implementations in this library. It has been modified from its
# original forms to accommodate minor architectural differences compared
# to GPT-NeoX and OPT used by the Meta AI team that trained the model.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@echo off
NET SESSION >nul 2>&1
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE >nul
GOTO ADMINTASKS
:ELEVATE
CD /d %~dp0 >nul
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1);close();" >nul
EXIT
@Geczy
Geczy / migrate.sh
Last active May 5, 2024 07:32
Migrate Coolify to a new server
#!/bin/bash
# This script will backup your Coolify instance and move everything to a new server. Docker volumes, Coolify database, and ssh keys
# 1. Script must run on the source server
# 2. Have all the containers running that you want to migrate
# Configuration - Modify as needed
sshKeyPath="$HOME/.ssh/your_private_key" # Key to destination server
destinationHost="server.example.com"
@Saw-mon-and-Natalie
Saw-mon-and-Natalie / loadExternalJs.md
Created September 27, 2019 06:38
javascript code snippet to use to load external JS libraries inside chrome dev tools console

How to import external JS libraries in Chrome dev tools console

fetch('link-to-external-js-library')
    .then(response => response.text())
    .then(text => eval(text))

example, loading lodash:

@Verssae
Verssae / skip.js
Last active May 5, 2024 07:30
한양대학교 인권/폭력예방 교육시스템 스킵 스크립트
/**
[강의 영상 스킵]
1. 재생버튼을 눌러 한양대 로딩 영상이 끝나고(약 4초) 강의가 재생된 후 F12 버튼을 눌러 개발자 콘솔을 연 뒤 console 탭으로 이동한다.
2. 아래 스크립트를 붙여넣는다.
3. 사이트에서 나갈 것이냐고 묻는 창이 뜨면 '나가기'를 누른다.
4. 다시 영상이 로드되면 재생 버튼을 눌러 재생하고 영상 끝으로 컨트롤 버튼을 움직여 영상 시청을 완료한다.
**/
@tas9n
tas9n / SimpleTextBox.hpp
Last active May 5, 2024 07:28
デバッグ用テキストボックス
#pragma once
#include <Siv3D.hpp>
/// @brief Simple text box
/// @tparam T Text box value
template<typename T>
struct SimpleTextBox {
mutable TextEditState edit;
String label;
T init;