Skip to content

Instantly share code, notes, and snippets.

View pafnuty's full-sized avatar
⚒️
No time for commit, just push!

Pavel Belousov pafnuty

⚒️
No time for commit, just push!
View GitHub Profile
@pafnuty
pafnuty / start_bec.bat
Created October 6, 2022 14:29 — forked from cp6/start_bec.bat
DayZ server start up batch file examples
@echo off
:start
::Server name
set serverName=Server1
::Server files location
set serverLocation="C:\Program Files (x86)\Steam\steamapps\common\DayZServer"
::Server Profile folder
set profile=Server1
::BEC location
set BECLocation="C:\Program Files (x86)\Steam\steamapps\common\DayZServer\BEC"
process.env.TS_NODE_PROJECT = './tsconfig.json';
import * as moment from 'moment'
import * as mocha from 'mocha';
import { assert } from 'chai';
import axios from "axios";
@pafnuty
pafnuty / readme.md
Created March 14, 2022 11:39 — forked from glennschler/readme.md
AWS Docker VPN

Using AWS Linux setup an L2TP/IPSEC Soft Ether VPN

Consider HVM (SSD) EBS-Backed 64-bit m3.medium

  • us-east-1 => ami-1ecae776

  • Updates and dependencies

sudo yum -y update
sudo yum -y upgrade
sudo yum -y install docker git wget
@pafnuty
pafnuty / D7_module_cheatsheet.md
Last active March 20, 2020 12:57 — forked from may-cat/Памятка по сборке модуля на D7
Памятка по сборке модуля на D7

Памятка по сборке модуля на D7

  1. Склонировать d7dull в папку /local/modules

  2. Заменить названия во всех файлах с учётом регистра maycat — ваш ник, разрешены ТОЛЬКО латинские буквы d7dull — название модуля Для этого нужно пройтись контекстным поиском по всей папке и внести изменения + переименовать файл в папке admin в соответствии с названияем модуля

  3. Продумать структуру классов и завести их в папке lib/ (подробнее о приёмах организации структуры - смотри видео) С помощью include.php подключить автолоад созданным классам

@pafnuty
pafnuty / ko.utils.3.5.0.signatures.js
Created July 18, 2019 08:56 — forked from hyle/ko.utils.3.5.0.signatures.js
KnockoutJS 3.5.0 utils (ko.utils) signatures
// knockout 3.5.0
ko.utils.addOrRemoveItem = function (array, value, included) { /* .. */ }
ko.utils.anyDomNodeIsAttachedToDocument = function (nodes) { /* .. */ }
ko.utils.arrayFilter = function (array, predicate) { /* .. */ }
ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ }
@pafnuty
pafnuty / group-objects-by-property.md
Created May 16, 2019 06:55 — forked from JamieMason/group-objects-by-property.md
Group Array of JavaScript Objects by Key or Property Value

Group Array of JavaScript Objects by Key or Property Value

Implementation

const groupBy = key => array =>
  array.reduce((objectsByKeyValue, obj) => {
    const value = obj[key];
    objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
    return objectsByKeyValue;
var tabbableElements = 'a[href], area[href], input:not([disabled]),' +
'select:not([disabled]), textarea:not([disabled]),' +
'button:not([disabled]), iframe, object, embed, *[tabindex],' +
'*[contenteditable]';
var keepFocus = function (context) {
var allTabbableElements = context.querySelectorAll(tabbableElements);
var firstTabbableElement = allTabbableElements[0];
var lastTabbableElement = allTabbableElements[allTabbableElements.length - 1];
<?php
/*
=============================================================================
BlockPro 3 - Модуль для вывода блоков с новостями на страницах сайта DLE (тестировался на 9.7 и 9.8)
=============================================================================
Автор модуля: ПафНутиЙ
URL: http://blockpro.ru/
ICQ: 817233
email: pafnuty10@gmail.com
=============================================================================
%h1.elegantshadow Elegant Shadow
%h1.deepshadow Deep Shadow
%h1.insetshadow Inset Shadow
%h1.retroshadow Retro Shadow
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->