Skip to content

Instantly share code, notes, and snippets.

View Fedik's full-sized avatar
🐢

Fedir Zinchuk Fedik

🐢
  • Ukraine
View GitHub Profile
@CptFoobar
CptFoobar / lsgpu.c
Last active November 17, 2025 21:58
Quick command line utility to list OpenCL compatible devices, along with their important attributes. (OpenCL must be previously installed)
/*
* Program to list all attached devices that support OpenCL, along with their key
* attributes.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
<?php
use Doctrine\DBAL\Driver\PDOSqlite\Driver;
use Doctrine\DBAL\Types\Type;
use Doctrine\ORM\Configuration;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Mapping\Driver\XmlDriver;
use Doctrine\ORM\Proxy\ProxyFactory;
use Ramsey\Uuid\Doctrine\UuidType;
@anakadote
anakadote / plugin.min.js
Last active September 7, 2017 08:35
A TinyMCE 4.* plugin to add support for Typekit fonts - place in a new folder at tinymce/plugins/typekit/ and replace kitId value. Don't forget to add "typekit" to your TinyMCE "plugins" config array.
tinymce.PluginManager.add('typekit', function(editor) {
editor.on('init', function() {
// Get the DOM document object for the IFRAME
var doc = this.getDoc();
// Create the script we will add to the header asynchronously
var jscript = "(function(d) {\n\
var config = {\n\
kitId: 'xxxxxxx',\n\
@bohwaz
bohwaz / php-8.1-strftime.php
Last active March 20, 2025 11:19
strftime() replacement function for PHP 8.1
<?php
namespace PHP81_BC;
/**
* Locale-formatted strftime using \IntlDateFormatter (PHP 8.1 compatible)
* This provides a cross-platform alternative to strftime() for when it will be removed from PHP.
* Note that output can be slightly different between libc sprintf and this function as it is using ICU.
*
* Usage:
* use function \PHP81_BC\strftime;