Skip to content

Instantly share code, notes, and snippets.

View forzenheart's full-sized avatar

lvyhe forzenheart

  • SOFTBRIDGE
  • China ShenZhen
  • 19:42 (UTC +08:00)
View GitHub Profile
FROM python:3.10-slim-buster
WORKDIR /app
COPY reiquirements.txt main.py
RUN pip install -r requirements.txt
CMD [ "python", "waitress_server" ]
@loneicewolf
loneicewolf / win_msgbox.c
Last active September 30, 2024 01:24
A simple message box in Windows using C
// i686-w64-mingw32-gcc -o M msgbox.c
#include <stdio.h>
#include <windows.h>
int main(int argc, char *argv[]){
if(argc != 3){
printf("usage: %s MESSAGE TITLE",argv[0]);
}
// MessageBox function (winuser.h)
// Displays a modal dialog box that contains
// a system icon,
@thesubtlety
thesubtlety / golang-windows-dll.go
Created February 5, 2020 05:18
Calling Windows DLLs from Go
package main
import (
"fmt"
"syscall"
"unicode/utf16"
"unsafe"
)
//https://github.com/golang/go/wiki/WindowsDLLs
@Meorawr
Meorawr / async.lua
Last active September 8, 2024 20:17
Lua 5.1 Async/Await
#!/usr/bin/lua5.1
--- Async/Await for Lua 5.1
-- This script implements async/await functions for Lua, allowing tasks to
-- be queued and scheduled independently.
--
-- This is just an example and has a bunch of issues, isn't tested, isn't
-- even actually used anywhere; I basically just got bored and had one of
-- those "what if?" type ideas 6 hours ago.
local co_create = coroutine.create
@mottosso
mottosso / README.md
Last active March 4, 2025 03:19
Minimal QML SceneGraph

untitled

Usage

python main.py --amount 100
  • Panning by left-click + drag
  • Scale by rotating the mouse wheel
@sinofool
sinofool / cmdbuild.sh
Last active September 19, 2023 20:54
A script to override xcode project configurations
#!/bin/bash
set -x
USAGE() {
cat << EOF
Usage: ${0##*/} <-i ident.p12> [-p password] <-m profile.mobileprovision> [-a com.example.app] [-n NewName] [-I Info.plist]
-i ident.p12 The signing identity file.
-p password The password of signing identity file.
-m profile.mobileprovision Signing provision profile
-a com.example.app Override CFBundleIdentifier
@drewsberry
drewsberry / UE4-build.bat
Last active October 31, 2024 17:01
UE4 Windows command line building
:: Build client
RunUAT BuildCookRun -project="full_path.uproject"^
-noP4 -platform=Win64^
-clientconfig=Development -serverconfig=Development^
-cook -allmaps -build -stage^
-pak -archive -archivedirectory="Output Directory"
:: Cook client
RunUAT BuildCookRun -project="full_project_path_and_project_name".uproject^
-noP4 -platform=Win64^
@trinitronx
trinitronx / Install_XCode.applescript
Created August 15, 2013 00:03
Script to automate XCode installation. Tested on OSX 10.8.4 Mountain Lion. I feel like using the UI element hierarchy is quite disgusting, but it works for now...
-- Function to select a menu item
-- We will use this to trigger the search box for the App Store
on do_menu(app_name, menu_name, menu_item)
try
-- bring the target application to the front
tell application app_name
activate
end tell
tell application "System Events"
tell process app_name