Skip to content

Instantly share code, notes, and snippets.

View cystbear's full-sized avatar
🚴‍♂️
🏄🏕️

Oleg Zinchenko cystbear

🚴‍♂️
🏄🏕️
View GitHub Profile
<?php
namespace App;
class Decorator
{
private $inner;
public function __construct($inner)
{
oc=3
dvfsb=0
gpu_dvfsc=0
limit_gpu_clk=0
ram_oc_vdd2=1350
ram_oc_vddq=650
ram_oc=2400000
no luminos consulting -- at all
only imported wiki
continuos avoid responsibility about backoffice
screen 1-2-3
looks like Michelle do not know what is going on the project and what Jenna does
Michelle just broke sftp integration with oro
https://shop.northernmetalic.com/admin/config/system/platform/app_sftp_file_integration_section
@cystbear
cystbear / GravityFalls.md
Last active July 21, 2022 19:33
Gravity Falls books
Книжка Є? Обкладинка
img
img
img
img
img
img
img
img
@cystbear
cystbear / curry.php
Created January 31, 2020 19:17
My PHP Currying implementation
<?php
function curry(\Closure $f) {
$rf = new \ReflectionFunction($f);
$arity = $rf->getNumberOfParameters();
function acc($f, $arity, $args=[]) {
return function(...$acc) use($f, $arity, $args) {
$acc = array_merge($args, $acc);
return (count($acc) >= $arity) ? $f(...$acc) : acc($f, $arity, $acc);
@cystbear
cystbear / vlm.erl
Last active February 18, 2017 07:18
Normalize path exercise by @vlm
-module(vlm).
-export([normalize_path/1]).
normalize_path(Path) ->
Suffix = case string:right(Path, 1) of
"/" -> "/";
_ -> ""
end,
@cystbear
cystbear / compose.php
Created November 8, 2015 01:01
My Function Composition implementation via PHP
<?php
function compose(/* funs to compose */) {
$fl = func_get_args();
return function($x) use($fl) {
$val = $x;
while (null !== $f = array_pop($fl)) {
$val = $f($val);
};
return $val;
@cystbear
cystbear / curry.php
Last active January 31, 2020 19:12
My PHP Currying implementation
<?php
function curry(\Closure $f) {
$rf = new \ReflectionFunction($f);
$arity = $rf->getNumberOfParameters();
function acc($f, $arity, $args=[]) {
return function(...$acc) use($f, $arity, $args) {
$acc = array_merge($args, $acc);
return (count($acc) >= $arity) ? $f(...$acc) : acc($f, $arity, $acc);
@cystbear
cystbear / collatz.erl
Last active January 11, 2017 14:05
Academic problems solved with Erlang
%% https://en.wikipedia.org/wiki/Collatz_conjecture
-module(collatz).
-export([collatz/1]).
collatz(N) -> collatz(N,0,[N]).
collatz(1, C, Acc) -> {C, lists:reverse(Acc)};
collatz(N, C, Acc) ->
R = case is_even(N) of
The MIT License (MIT)
Copyright (c) 2015 Oleg Zinchenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: