Skip to content

Instantly share code, notes, and snippets.

View batFormat's full-sized avatar
🏠
Working from home

Maxim Kot batFormat

🏠
Working from home
View GitHub Profile
@batFormat
batFormat / MergeCellsGoogleSheets.php
Created September 12, 2021 20:54
Merge cells in google sheets
<?php
class Test {
public function test() {
$service = new Google_Service_Sheets(GoogleService::getClient());
$spreadsheetId = 'abcdf';
$values = [
["Item", "Cost", "Stocked"],
["Wheel", "$20.50", "4"]
@batFormat
batFormat / Player.js
Created January 30, 2021 03:10
Плеер который написан в Forecast
var storageAvailable,
storageData = {};
function storageAvailable(e) {
try {
var t = window[e],
r = '__storage_test__';
return t.setItem(r, r), t.removeItem(r), !0;
} catch (e) {
return !1;
}
@batFormat
batFormat / sphp.sh
Last active January 1, 2021 22:05 — forked from rhukster/sphp.sh
Easy Brew PHP version switching without apache
#!/bin/bash
# Creator: Phil Cook
# Modified: Maxim Kot
osx_major_version=$(sw_vers -productVersion | cut -d. -f1)
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2)
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3)
osx_patch_version=${osx_patch_version:-0}
osx_version=$((${osx_major_version} * 10000 + ${osx_minor_version} * 100 + ${osx_patch_version}))
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g')
@batFormat
batFormat / app.jsx
Created November 8, 2020 13:01
Использование SplitLayout и SplitCol
<AdaptivityProvider>
<Root activeView="view-root">
<View
id="view-root"
activePanel="home"
>
<Panel id="home">
<PanelHeaderSimple>
Тест панель
</PanelHeaderSimple>
@batFormat
batFormat / app.jsx
Last active September 17, 2020 11:35
<Epic
activeStory={location.getViewId()}
tabbar={
<Tabbar>
{tabbarItems.map(({ title, page, icon, panels }) => (
<TabbarItem
key={page}
onClick={() => router.pushPage(page)}
selected={panels.includes(location.getPanelId())}
text={title}
@batFormat
batFormat / gist:ce009d0a68db8edbd15f8edb7c084b99
Last active May 27, 2020 17:17
Пример ответа от метода upload, из vk-php-sdk
// $photo = $this->vk
// ->getRequest()
// ->upload($url, 'photo', 'test_photo.JPG');
array:5 [
"server" => 204516
"photo" => "[{"markers_restarted":true,"photo":"04914fa9e7:w","sizes":[],"latitude":0,"longitude":0,"kid":"76773f0968e622e4565c1569f69a8e4e","sizes2":[["s","6d3ccf1f62fa7764dfe4b4cae135a20f07eb7c3ae037c0c3fd4f6a92","-4517628954411015465",75,56],["m","bb6a7e5577b2f06227f05ce4d67c3e15fef361833134df31487120a6","-3219168273734240088",130,97],["x","04e0cd1d4e363ac137f7730a5dd3b1f947f9c94d647fa34c32c1baae","879059161582419064",604,453],["y","bdb21ba50d99a4355dd8c9435a9153d4280ef370ebb080708ee8634e","-3446015447328514989",807,605],["z","c083f91878ac5010007a63ff6137c3f1f6cd1778fe8cd0a4cd8cabcd","1636530027326253434",1280,960],["w","88ef2bee876cc034688e125bfa93edcae72f1f46455cc1c89671c487","-3571565795873561491",1707,1280],["o","e6afaa8eab96cc91e47729db706fcc8c54ff77beb76b912032bf8196","-7087800100686053181",130,98],["p","fa7a25f29b7324b231a495f14591af84994448c0ab96209959aa0815","-189001268309978181"
@batFormat
batFormat / Activate Office 2019 for macOS VoL.md
Created January 12, 2020 22:18 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

server {
listen 80;
#listen 443 ssl http2;
# set path to your project dir
set $root_path /root/app/Chugainov;
# your domain
server_name chugainov.ru;
@batFormat
batFormat / calling_codes.json
Last active June 26, 2019 10:40
calling codes
[
{
"iso": "AF",
"code": [
"93"
]
},
{
"iso": "AX",
"code": [