Skip to content

Instantly share code, notes, and snippets.

@Epskampie
Epskampie / gist:11281368
Last active August 29, 2015 14:00
nodejs uppercase headers hack
var http = require('http');
var automaticHeaders = {
connection: true,
'content-length': true,
'transfer-encoding': true,
date: true
};
http.OutgoingMessage.prototype.setHeader = function(name, value) {
mkdir graphql_server && cd graphql_server
npm install --save ts-node typeorm typescript vesper reflect-metadata mysql @types/mysql
@Epskampie
Epskampie / mute_game.ahk
Created April 28, 2019 11:12
Autohotkey fullscreen/windowed and mute/unmute game with one button (scroll lock)
; Download NirCmd.exe and put it in a "Lib" folder next to this script
; https://www.nirsoft.net/utils/nircmd.html
winTitle := "Forza Motorsport 7"
procName := "forzamotorsport7.exe"
Pause::
Run, "Lib\nircmd.exe" muteappvolume %procName% 2
return
@Epskampie
Epskampie / EntityNormalizer.php
Last active October 14, 2022 12:24
Automatically deserialize doctrine entities when using Symfony Serializer
<?php declare (strict_types = 1);
namespace App\Normalizer;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
/**
* Entity normalizer
*/
class EntityNormalizer implements DenormalizerInterface
#!/bin/php
<?php
/**
* Helper script to use php-cs-fixer with stdin / stdout
**/
$temp_file = tempnam(sys_get_temp_dir(), 'fix_');
$input = file_get_contents("php://stdin");