Skip to content

Instantly share code, notes, and snippets.

View xorik's full-sized avatar
🙃
Building something great!

Andrey xorik

🙃
Building something great!
View GitHub Profile
@xorik
xorik / MF.md
Last active April 6, 2024 15:49
Польские инкубаторы

Moja Firma

https://mojafirma.org/

Шаги

  1. Вы заключаете контракт со своим клиентом (клиентами) или через фриланс биржи, используя юридические данные нашего бизнес-инкубатора;
  2. Полученные средства поступают на ваш фирменный суб-счет (валюта PLN, EUR, USD), которые вы потом себе выплачиваете как заработную плату в рамках договора с нами;
  3. Предоставив польским государственным органом подтверждение того, что вы тведете деятельность и проводите доход легально, вы получаете ВНЖ в Польше.
@xorik
xorik / restore-empty-lines.php
Created December 30, 2021 21:38
Restore empty lines after rector
<?php
declare(strict_types=1);
exec('git diff', $diff);
$currentFile = $chunkStart = null;
$fileChanged = false;
$chunkOffset = 0;
$fileLines = [];
@xorik
xorik / portamento.rb
Last active January 26, 2021 09:35
Sonic pi portamento
STOP_NOTE = 60 # stop on pressing the C note, you can use another MIDI or timer event to stop the synth
live_loop :midi_keys do
use_real_time
note, velocity = sync "/midi:*:1/note_*"
if velocity > 0 && note != STOP_NOTE
if (get :current_note) == nil
use_synth :dsaw
x = play note: note, note_slide: 0.3, amp: velocity / 127.0, sustain: 300
@xorik
xorik / README.md
Last active August 14, 2020 08:54
Toggl api PHP
  • composer install ajt/guzzle-toggl
  • Put your token into line 8
  • Run getProjects(), put workspace and project ID in lines 9 and 10
  • Run getTasks() or getCurrentTask()
<?php
use Brick\Math\BigInteger;
require __DIR__.'/vendor/autoload.php';
global $digits;
$digits = [2, 3, 4, 6, 7, 8, 9];
$maxLen = 0;
@xorik
xorik / Email.php
Created February 19, 2017 08:34
phpspec demo
<?php
namespace App;
class Email
{
protected $body;
public function setBody($body)
{
$this->body = $body;