This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 1. This tells docker to use the Rust official image | |
| FROM debian | |
| SHELL ["/bin/bash", "-c"] | |
| RUN apt update && apt install python3-pip python3-venv pkg-config libssl-dev curl -y | |
| RUN python3 -m venv /venv | |
| ENV PATH="/venv/bin:/root/.cargo/bin/:$PATH" | |
| ENV RUST_BACKTRACE=1 | |
| RUN python3 -m pip install ziglang |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run \ | |
| -it \ | |
| --rm \ | |
| --entrypoint bash \ | |
| -v ${PWD}:/host \ | |
| -e ODBCINI=/opt/odbc.ini \ | |
| -e ODBCSYSINI=/opt/ \ | |
| public.ecr.aws/lambda/python:3.13 | |
| dnf update -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find from-dir/ -name '*.txt' -exec bash -c 'export A="$(dirname {})"; mkdir -p to-dir/$A && mv {} to-dir/{}' \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import decimal | |
| class ComplexEncoder(json.JSONEncoder): | |
| def default(self, obj): | |
| if isinstance(obj, decimal.Decimal): | |
| return int(obj) if obj % 1 == 0 else float(obj) | |
| return json.JSONEncoder.default(self, obj) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DSTPATH="path/to/file.json" CONTENT="$(cat ${DSTPATH})"; echo "$CONTENT" | jq --sort-keys > $DSTPATH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select sc.name as service_contract_name, smt.name as service_message_type_name, s.name as service_name, sq.name | |
| from sys.service_contracts sc | |
| join sys.service_contract_message_usages scmu on sc.service_contract_id = scmu.service_contract_id | |
| join sys.service_message_types smt on scmu.message_type_id = smt.message_type_id | |
| join sys.service_contract_usages scu on sc.service_contract_id = scu.service_contract_id | |
| join sys.services s on scu.service_id = s.service_id | |
| join sys.service_queue_usages squ on squ.service_id = s.service_id | |
| join sys.service_queues sq on squ.service_queue_id = sq.object_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| ############################################################################### | |
| # # | |
| # IPFire.org - A linux based firewall # | |
| # Copyright (C) 2022 Michael Tremer # | |
| # # | |
| # This program is free software: you can redistribute it and/or modify # | |
| # it under the terms of the GNU General Public License as published by # | |
| # the Free Software Foundation, either version 3 of the License, or # | |
| # (at your option) any later version. # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new Date(Math.round(Date.now()/8.64e7)*8.64e7).toISOString() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <body> | |
| <select name="brand" id="brand"></select> | |
| <select name="brand" id="model"></select> | |
| <script> | |
| const data = { | |
| Fischer: [ | |
| "Speed Cl Zero", | |
| "Speed Twin Skin", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Make sure project type is windows application | |
| */ | |
| #define _WIN32_WINNT 0x0500 | |
| #include<windows.h> | |
| #include<cmath> | |
| #include <stdio.h> | |
| LRESULT CALLBACK mouseHookProc(int nCode, WPARAM wParam, LPARAM lParam) { |
NewerOlder