Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View amenophis's full-sized avatar

Jérémy Leherpeur amenophis

View GitHub Profile
@amenophis
amenophis / STREAMDECK_HID.md
Created January 6, 2024 11:52 — forked from cliffrowley/STREAMDECK_HID.md
Notes on the Stream Deck HID protocol

Stream Deck Protocol

How to interface with a Stream Deck device.

Synopsis

The device uses the HID protocol to communicate with its software.

Configuration

@amenophis
amenophis / README.md
Last active October 26, 2022 08:32
htmltopdf with pupeteer and chrome

htmltopdf with pupeteer and chrome

Install

Install project dependencies:

yarn

Start

use std::collections::HashMap;
use std::thread;
use std::thread::sleep;
use std::time::Duration;
use streamdeck::StreamDeck;
const ELGATO_VENDOR_ID: u16 = 0x0fd9;
use rusb::{Context, Device, HotplugBuilder, UsbContext};
<?php
class Collection<T>
{
private T[] $items = [];
public function add(T $item): void
{
$this->items[] = $item;
}
name: CI
on: [push]
jobs:
test-php:
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.3, 7.4]

Keybase proof

I hereby claim:

  • I am amenophis on github.
  • I am amenophis (https://keybase.io/amenophis) on keybase.
  • I have a public key ASDyQY-XEey4iduuPMBl_nCCJy1ilQlrQHiA5CPLxaWO7wo

To claim this, I am signing this object:

@amenophis
amenophis / README.md
Last active August 29, 2015 14:24 — forked from chadrien/README.md

Init boot2docker

Create boot2docker instance and start it

$ boot2docker init --dhcp=false --hostip=172.16.0.1
$ boot2docker up

Configure the instance

Install OS X 10.10 Yosemite in VirtualBox

(based on this pastebin i've found via Google, markdownified and adjusted to work with the official Yosemite release)

Yosemite's first developer preview was released right after Monday's WWDC opening keynote. For the general public, an open beta will be available to download later this summer. However, for those who want a sneak peek at the new hotness, there is a way to safely install it without risking your machine, using the free and powerful VirtualBox application from Oracle.

(LEGAL DISCLAIMER: This guide aims to explain how to create a virtual machine on a regularly purchased Apple computer, running a genuine Mac OS X operating system, for testing purposes only.)

@amenophis
amenophis / flashes.twig
Created January 5, 2014 21:34
Symfony flashes twig
{% for label, flashes in app.session.flashbag.all %}
{% for flash in flashes %}
<div class="alert alert-{{ label }}">
{{ flash }}
</div>
{% endfor %}
{% endfor %}
@amenophis
amenophis / AppKernel.php
Last active December 31, 2015 18:59
[Symfony] CRUD avec SyliusResourceBundle
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(