This file contains 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/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')" | |
# syntax = docker/dockerfile:1.4.0 | |
FROM node:20 | |
WORKDIR /root | |
RUN npm install sqlite3 |
This file contains 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 os | |
import time | |
import argparse | |
start = time.time() | |
os.system("nvidia-smi") | |
# import libraries |
This file contains 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
var createScene = function () { | |
var scene = new BABYLON.Scene(engine); | |
var camera = new BABYLON.FlyCamera("FlyCamera", new BABYLON.Vector3(0, 5, -10), scene); | |
camera.attachControl(canvas, true); | |
var light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(0, 1, 0), scene); | |
light.intensity = 0.7; | |
var hk = new BABYLON.HavokPlugin(); |
This file contains 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
use bevy::{ | |
prelude::*, | |
render::pass::ClearColor, | |
}; | |
fn main() { | |
App::build() | |
.add_plugins(DefaultPlugins) | |
.insert_resource(ClearColor(Color::rgb(0.9, 0.9, 0.9))) | |
.add_startup_system(setup.system()) |
This file contains 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
use bevy::{ | |
prelude::*, | |
render::pass::ClearColor, | |
}; | |
fn main() { | |
App::build() | |
.add_plugins(DefaultPlugins) | |
.insert_resource(ClearColor(Color::rgb(0.9, 0.9, 0.9))) | |
.add_startup_system(setup.system()) |
This file contains 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
Compiling an Android project that depends on OpenSSL using Prefabs | |
Prefabs are a new feature of the Android Gradle Plugin 4.0. | |
Here is an outdated but still informative blog post about the subject: | |
https://android-developers.googleblog.com/2020/02/native-dependencies-in-android-studio-40.html | |
In the app build.gradle you simply add: | |
dependencies { | |
implementation 'com.android.ndk.thirdparty:openssl:1.1.1g-alpha-1' |
This file contains 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
LittleEndian(); | |
char signature[4]; | |
uint32 version; | |
uint64 u1a; | |
uint64 u1b; | |
char material_count; | |
uint32 u2; | |
uint32 block_count; |
This file contains 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 os | |
import json | |
import os.path | |
import google.oauth2.credentials | |
from google.oauth2.credentials import Credentials | |
from googleapiclient.discovery import build | |
from googleapiclient.errors import HttpError | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
CLIENT_SECRETS_FILE = "client_secret.json" |
This file contains 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
function ac(type_: string, father: HTMLElement): HTMLElement { | |
return father.appendChild(document.createElement(type_)); | |
} | |
function getById(id: string): HTMLElement { | |
return document.getElementById(id); | |
} | |
function shuffle<T>(a: Array<T>) { | |
for (var i = 81; i >= 0; i--) { |
This file contains 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
class Config: | |
REST_BASE_URL = "https://myip:4444/api/" | |
AUTH=('token', 'mytoken') | |
import requests | |
PGP= { | |
"comment": "", | |
"emails": [ | |
"[email protected]" |
NewerOlder