This file contains 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
import subprocess | |
import os | |
import zipfile | |
import sys | |
from datetime import datetime | |
out = subprocess.check_output(["git", "diff", "--name-only", "--diff-filter=d"]).decode().splitlines() | |
out2 = subprocess.check_output(["git", "ls-files", "--others", "--exclude-standard"]).decode().splitlines() | |
if len(out) > 0 or len(out2) > 0: |
This file contains 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
function kkm(charge, startRate, endRate, days=92, percentage=17){ | |
let interest = charge * (percentage / 100) * (days / 365); | |
let forex = (endRate - startRate) * (charge / startRate); | |
if(forex > interest){ | |
return forex + charge; | |
} else { | |
return interest + charge; | |
} | |
} |
This file contains 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
#!/usr/bin/env php | |
<?php | |
exec("git diff --name-only --diff-filter=d", $out); | |
exec("git ls-files --others --exclude-standard", $out2); | |
if (count($out) > 0 || count($out2) > 0) { | |
$zip = new ZipArchive(); | |
$zipName = "patch-" . date("YmdHi") . ".zip"; | |
if ($zip->open($zipName, ZipArchive::CREATE)) { | |
foreach ($out as $line) { |