Skip to content

Instantly share code, notes, and snippets.

View adadgio's full-sized avatar

Romain Bruckert adadgio

View GitHub Profile
@adadgio
adadgio / gist:d6f148c6609cd1f4d376a6e04edc720a
Created October 3, 2025 11:11
Godot 4 - Unconventional optimized boids / flocks
extends Node2D
@export var entities_count: int = 5000
@export var entities_container: Node2D
@export_category("Optimization")
@export var draw_grid: bool = true
@export var grid_color: Color = Color(0.3, 0.8, 1.0, 0.3)
@export var grid_cell_size: float = 100.0
@export var randomness_frame_update_interval: int = 30
<?php
namespace Medical\CoreBundle\Component\Tool;
class CreatinineCalculator
{
const MDRD = 'MDRD';
const COCKROFT = 'COCKROFT';
/**
import ROOT_DIR from '../../rootdir'
require('dotenv').config({ path: `${ROOT_DIR}/.env` })
import axios, { AxiosResponse } from 'axios'
import { Notification, ios, android, openInPayload } from './notifications'
type NamedUser = {
named_user_id: string
attributes: any
channels: any[]
}
{
"result": [
{
"objectId": "oArt1234x",
"createdAt": "2015-12-01T01:01:01.000Z",
"updatedAt": "2021-10-29T09:39:47.000Z",
"__type": "Object",
"className": "Article",
"m_id": 1234,
"m_label": "test video live",
//ProjectListFilter
interface Range {
from: number;
to: number;
}
type UiFilterObject = {
id: string
label: string
// In some script
if (!has(['username', 'password'], req.body) {
// console.log('Request body: <username> and <password> are required')
}
// Function in file: has.ts
export const NOT_EMPTY = true
export function has(thoseKeys: Array<string>, object: any, cantBeEmpty: boolean = false)
{
import { ADVERT_TYPES } from "./Advert"
//export const CAMPAIGN_ACTIONS = [...ADVERT_TYPES, ['shortlink', 'notification']]
export class Project {
id: string | null = null
name: string | null = null
keyAccount: string | null = null
status: string | null = "1"
clientName: string | null = null
/**
* Convert any input data to bits representation.
*/
export type RowInput = {
[prop: string]: string|number|Array<string|number>|boolean;
};
export function isArray(input: any)
{
return ( Object.prototype.toString.call(input) === '[object Array]' ) ? true : false;
// if not on symfony, adapt... but logic is here !
<?php
namespace Medical\CoreBundle\Controller;
use Symfony\Component\Finder\Finder;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
<div class="upload-widget" id="upload-widget">
<div class="upload-widget-header">Upload item(s)</div>
<div class="upload-widget-items">
<ul id="upload-widget-list" data-prototype="{% filter escape %}
{{ include('MedicalCoreBundle:Upload:upload_item_prototype.html.twig', { truc: null }) }}
{% endfilter %}">
</ul>
</div>
</div>