Skip to content

Instantly share code, notes, and snippets.

View Serabass's full-sized avatar
💭
I got nothing to do

Serabass Serabass

💭
I got nothing to do
  • Kazakhstan
View GitHub Profile
<?php
// https://habr.com/ru/post/26518/
$from = "from@mail.com";
ini_set("sendmail_from", $from);
ini_set("SMTP", "myserver");
ini_set("smtp_port", 25);
@Serabass
Serabass / require-gql.js
Last active December 6, 2018 07:33
Require GraphQL in Node
import * as fs from 'fs';
require.extensions['.gql'] = function (module, filename) {
const content = fs.readFileSync(filename).toString('utf-8');
module._compile(`
exports.default = ${JSON.stringify(content)}; // Здесь можно вызвать, например buildSchema и вернуть собранную схему.
`, filename);
};