Skip to content

Instantly share code, notes, and snippets.

View AlexNDRmac's full-sized avatar
🇺🇦

Oleksandr Andriiako AlexNDRmac

🇺🇦
View GitHub Profile
@AlexNDRmac
AlexNDRmac / netfx-props.md
Last active April 1, 2020 09:34
.Net props for MSBuild to assemble win-only project on macOS with Mono

Build .Net Solution using Mono on unix-like OS

Create netfx.props file with path to Mono Framework

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation.  All Rights Reserved.  See License.txt in the project root for license information. -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
@AlexNDRmac
AlexNDRmac / circleci.sh
Created January 2, 2020 12:30
CircleCi local run
#!/bin/bash
# Use CircleCI from the command line.
# This project is the seed for CircleCI's new command-line application.
# For more help, see the documentation here: https://circleci.com/docs/2.0/local-cli/
# Usage:
@AlexNDRmac
AlexNDRmac / codecov.yml
Created December 31, 2019 12:30
Full codecov configuration
codecov:
token: uuid # Your private repository token
url: "http" # for Codecov Enterprise customers
slug: "owner/repo" # for Codecov Enterprise customers
branch: master # override the default branch
bot: username # set user whom will be the consumer of oauth requests
ci: # Custom CI domains if Codecov does not identify them automatically
- ci.domain.com
- !provider # ignore these providers when checking if CI passed
# ex. You may test on Travis, Circle, and AppVeyor, but only need
@AlexNDRmac
AlexNDRmac / phpenv-install.md
Last active February 13, 2024 04:17 — forked from sergeyklay/phpenv-install.md
Multiple PHP versions using phpenv and php-build

Multiple PHP versions using phpenv and php-build

Install dependecies

Debian/Ubuntu users

sudo apt install \
  autoconf \
 bison \
@AlexNDRmac
AlexNDRmac / save_webpage_with_wget.md
Last active August 25, 2019 10:36
Save entire web page for locally browsing with wget
$ wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --html-extension \
     --convert-links \
     --domains gist.github.com \
     --no-parent \
 https://gist.github.com/AlexNDRmac/6cc76125a0ba96a7d51d3e5a26b9ff3b/

I recently got a new Macbook Pro and wanted to document how I setup my PHP environment. I like full control of how PHP is built and I usually build it from source. I do this because I often add custom extensions and modules not found in the common PHP OSX installers. If your looking for a easier method than building from source try https://php-osx.liip.ch/.

NOTE: This post assumes you are running a fresh install of MacOS Sierra 10.12.16 with System Integrity Protection disabled. If you don't know how to disable it just boot into recovery mode and open a terminal and type csrutil disable, or google search it :) This post also assumes you are using Zsh instead of Bash shell. If you are using Bash you can replace anytime you see ~/.zshrc with ~/.bashrc.

First lets get some of the prerequisites. Start by grabbing the command line tools neccessary:

xcode-select --install
@AlexNDRmac
AlexNDRmac / shell_command.md
Last active June 27, 2019 13:16
shell commands

Find all files bigger then XX MB

"du -h" makes better list of files

"sort -n" makes list sorted by file size (desc)

find ./ -size +50M -type f -exec du -h {} \; | sort -k1 -h
@AlexNDRmac
AlexNDRmac / postman_cheatsheet.md
Last active December 11, 2023 22:37
Snippets and Usage examples for Postman autotests

Postman Tests

Assertions examples

// Response should have JSON Body
pm.test("Response should have JSON Body", function () { 
    pm.response.to.have.jsonBody();
});
@AlexNDRmac
AlexNDRmac / bash_jobs.org
Last active April 29, 2019 18:19
Using Jobs via BASH

If you’ve just started a huge process (like backupping a lot of files) using an ssh terminal and you suddenly remember that you need to do something else on the same server, you might want to get the huge process to the background. You can do this by pressing Ctrl + z, which will suspend the process, and then executing the bg command:

$ bg
[1]+ hugeprocess &
@AlexNDRmac
AlexNDRmac / suppress_phpmd_warnings.md
Last active May 7, 2019 18:33
Mess Detector Inspections

Suppress specific PHPMD warnings

Unused code:

  • UnusedPrivateField
  • UnusedLocalVariable
  • UnusedPrivateMethod
  • UnusedFormalParameter

Naming: