Skip to content

Instantly share code, notes, and snippets.

View rabbl's full-sized avatar

Ralf Junghanns rabbl

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"outputs": [],
"source": [
"import sys\n",
"\n",
"sys.path.insert(0, '..')"
@rabbl
rabbl / gist:ceef6a6e9f692c55f7039abdc281c5d6
Created November 27, 2023 09:06
ConstantHeadBoundaryMapping
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"outputs": [],
"source": [
"import sys\n",
"\n",
"import numpy as np\n",
@rabbl
rabbl / build.sh
Created November 24, 2023 08:26 — forked from tifasoftware/build.sh
Building Source Engine for Apple Silicon
#!/bin/zsh
brew install sdl2 freetype2 fontconfig pkg-config opus libpng libedit
cd ~
mkdir ~/Documents/Gaming/
mkdir ~/Documents/Gaming/Half\ Life\ 2
mkdir ~/Documents/Gaming/Half\ Life\ 2\ Episodes
mkdir ~/Documents/Gaming/Portal
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rabbl
rabbl / rotate_2d_point.py
Created November 2, 2023 07:19 — forked from LyleScott/rotate_2d_point.py
Rotate X,Y (2D) coordinates around a point or origin in Python
"""
Lyle Scott, III // lyle@ls3.io
Multiple ways to rotate a 2D point around the origin / a point.
Timer benchmark results @ https://gist.github.com/LyleScott/d17e9d314fbe6fc29767d8c5c029c362
"""
from __future__ import print_function
import math
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?php
// src/Command/CreateUserCommand.php
declare(strict_types=1);
namespace App\Command;
use App\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
@rabbl
rabbl / User.php
Last active February 2, 2019 22:26
User.php
<?php
// src/Entity/User.php
declare(strict_types=1);
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\Uuid;
// This is working
public function testInsertNullRaster()
{
$conn = $this->entityManager->getConnection();
$stmt = $conn->prepare('SET NAMES \'UTF8\'');
$stmt->execute();
$stmt = $conn->prepare('SELECT NEXTVAL(\'rasters_id_seq\')');
$stmt->execute();