Skip to content

Instantly share code, notes, and snippets.

View ildarkhasanshin's full-sized avatar
🚀
eat sleep code repeat

ildar r. khasanshin ildarkhasanshin

🚀
eat sleep code repeat
View GitHub Profile
# откатываем последний коммит, но не удаляем изменения
git reset HEAD~ --soft
git add .
git stash
# переключаемся на нужную ветку
git checkout имя-верной-ветки
git stash pop
git add .
git commit -m "тут ваш комментарий"
# теперь изменения в нужной ветке
@ankurk91
ankurk91 / xdebug-mac.md
Last active September 20, 2025 11:22
php xDebug v3 on Ubuntu/Mac and phpStorm

🪲 Install and Configure xDebug v3 on MacOS for PhpStorm 🐘

  • Assuming that you have already installed php and apache via Homebrew

  • Install xDebug php extension

pecl channel-update pecl.php.net
pecl clear-cache

pecl install xdebug
@nalgeon
nalgeon / README.md
Last active September 10, 2020 21:21
Пример работы с подсказками DaData на PHP (через cUrl)

Подсказки на PHP

Для большинства PHP-приложений достаточно использовать jQuery-плагин. Он проще в подключении и красиво выглядит. Используйте прямую работу с API на PHP только в том случае, если вы твёрдо уверены, что jQuery-плагин не подходит.

https://github.com/hflabs/dadata-php

@Jwely
Jwely / download_ftp_tree.py
Last active November 14, 2025 02:52
recursive ftp directory downloader with python
import ftplib
import os
import re
"""
MIT license: 2017 - Jwely
Example usage:
``` python
import ftplib
@JordanReiter
JordanReiter / crontab
Last active October 7, 2024 06:50
Remind yourself of what you did over the past day and week by reading a summary of all of your git commits.
0 22 * * 1,2,3,4,5 /path/to/git_changes.sh /path/to/projects/ # Sends 5 PM EST if server time is UTC
0 21 * * 5 /path/to/git_changes.sh -w /path/to/projects # Sends Friday @ 4PM EST if server time is UTC
<?
define('LOG_FILENAME', __DIR__.'/log/'.date('Ymd').'.log');
require_once($_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/main/include/prolog_before.php');
use Bitrix\Main\Loader;
Loader::includeModule("iblock");
Uplab\Helper::loadMainMsg();
use Bitrix\Main\Localization\Loc;
<!-- for result_modifier.php -->
@joshisumit
joshisumit / python_request_create_gist.py
Last active May 12, 2026 01:40
Create GIST from your python code with python requests module and OAuth token.
'''
HTTP Reuests has following parameters:
1)Request URL
2)Header Fields
3)Parameter
4)Request body
'''
#!/usr/bin/env python
import requests
<?
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php");
$APPLICATION->SetTitle("Экспорт списка юзеров и получателей рассылок");
$expSubscribesFile = 'subscribes.csv';
$expUsersFile = 'users.csv';
$strDlmtr = ';';
$lineDlmtr = "\n";
$arUsers = array('#,Фамилия,Имя,Отчество,EMail');
@AFelipeTrujillo
AFelipeTrujillo / addAttendee.php
Last active February 26, 2024 21:28
Use Google Calendar API
<?php
include_once 'google-api-php-client/vendor/autoload.php';
$client = new Google_Client();
$application_creds = 'service-account-credentials.json';
$credentials_file = file_exists($application_creds) ? $application_creds : false;
define("SCOPE",Google_Service_Calendar::CALENDAR);
define("APP_NAME","Google Calendar API PHP");
@nokimaro
nokimaro / weather.md
Last active April 26, 2026 17:57
API для погоды