This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require dirname(__FILE__). '/vendor/autoload.php'; | |
use Gettext\Translator; | |
use Gettext\Translations; | |
$tplDir = dirname(__FILE__).'/templates/'; | |
$tmpDir = dirname(__FILE__).'/tmp/cache/'; | |
$loader = new Twig_Loader_Filesystem($tplDir); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO: Refactor this file | |
// It looks like a codegenerated crazy boilerplate code. | |
#define _HB_API_INTERNAL_ 1 | |
#include <hbapi.h> | |
#include <hbapierr.h> | |
#include <hbstack.h> | |
#include <windows.h> | |
#include <hbapiitm.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <hbapi.h> | |
#include <vector> | |
#include <map> | |
#include <cstdlib> | |
typedef std::vector<HWND> HWND_ARRAY; | |
std::map<HWND, HWND_ARRAY*> arrOverlays; | |
std::map<HWND, HBRUSH> overlaysBrushes; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hotReload = (address, options = {}) => { | |
// Константы | |
const CONST_RELOAD_MESSAGE = 'HOT_RELOAD_NOW'; | |
// Настройки | |
const reconnect_timeout = options.reconnect_timeout || 500; | |
const reconnect_tries = options.reconnect_tries || 5; | |
// Локальные переменные | |
let socket = null; | |
let current_tries = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.xpathSelectorAll = (selector) => { | |
const nodes = document.evaluate(selector, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
return Array(nodes.snapshotLength).fill(1).map((x, id) => nodes.snapshotItem(id)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>IE10 Compatibility Vue SFC Loader</title> | |
<script src="https://unpkg.com/[email protected]/dist/vue.js"></script> | |
<script src="https://unpkg.com/[email protected]/dist/polyfill.min.js"></script> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Now if you adding a domain with wildcard A record, Cloudflare uses strange scan, which added a 1000 trash domains (like 1-100, some english words like "ai", "air", "android"). | |
// There's no way to bulk delete it, you can delete it only using their API. | |
// So I write a script that can help you with this problem. | |
// Discussions about same problem: | |
// https://community.cloudflare.com/t/delete-all-records-using-api/13410/2 | |
// https://community.cloudflare.com/t/bulk-delete-dns-record/89540 | |
const settings = { | |
email: 'your@email', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const commander = require('commander'); | |
const colors = require('colors'); | |
const replace = require('replace-in-file'); | |
const fs = require('fs'); | |
const util = require('util'); | |
let path = null; | |
commander | |
.version('0.1.0') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Utils = { | |
findUsersByMessage(ev) { | |
const findUsers = ev => { | |
const regExMention = /<@(\d+)>/g; | |
const users = [...ev.content.matchAll(regExMention)]; | |
return users.map(x => x[1]); | |
} | |
const findGroups = ev => { | |
const regExMention = /<@&(\d+)>/g; | |
const groupsIds = [...ev.content.matchAll(regExMention)].map(x => x[1]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$projectName = Get-ChildItem .\ -Filter "*.sln" | Select-Object -ExpandProperty Name | |
if (!$projectName) { | |
Write-Host "Not found any *.SLN files in current directory!" | |
Write-Host "Exit with error..." | |
exit | |
} | |
$projectName = [io.path]::GetFileNameWithoutExtension($projectName) | |
$targetZip = $projectName + ".zip" |