Skip to content

Instantly share code, notes, and snippets.

View forzenheart's full-sized avatar
🤪

lvyhe forzenheart

🤪
  • China ShenZhen
  • 02:01 (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
@baymaxium
baymaxium / content.md
Created October 18, 2017 09:20
为什么Google上十亿行代码都放在同一个仓库里?

原文:高可用架构

导读:相对于一般公司,Google 使用了单一代码仓库,很多人不理解为什么这么做。本文作者是谷歌基础设施小组的工程师,对这个问题进行了详细解读。译者在翻译过程中受益良多,也相信大家看完之后会认为自己还活在史前时代。

早期 Google 员工决定使用集中式源代码管理系统来管理代码库。 这种方法已经在 Google 运行了 16 年以上,而今天绝大多数的 Google 软件仍然存储在一个共享的代码库中,随着 Google 开发软件数量稳步增加,Google 代码库的规模也呈指数增长(图1)。 因此,用于管理代码库的技术也发生了显著变化。

图1

@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