Skip to content

Instantly share code, notes, and snippets.

@mpijierro
mpijierro / madelineproto_invito_to_channel.php
Last active August 24, 2023 22:47
Invite to Channel with MadelieProto (PHP (Laravel))
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request
use danog\MadelineProto\API;
class InviteParticipantsController extends Controller
{
private $madelineProto;
@mpijierro
mpijierro / get_self.php
Last active April 2, 2021 06:14
Get your own information from Telegram API with MadelineProto in Laravel
<?php
namespace App\Http\Controllers\Telegram;
use App\Http\Controllers\Controller;
use danog\MadelineProto\API;
class MeController extends Controller
{
private $madelineProto;
@mpijierro
mpijierro / madelineproto_session.php
Created March 31, 2021 07:18
New session in Telegram with MadelineProto
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Http\Controllers\MadelineTrait;
class TelegramSessionController extends Controller
{
@mpijierro
mpijierro / gpoint.php
Created October 23, 2020 05:23 — forked from cypres/gpoint.php
PHP class to convert Latitude & Longitude coordinates into UTM & Lambert Conic Conformal Northing/Easting coordinates.
<?php
/**
* PHP class to convert Latitude & Longitude coordinates into UTM & Lambert Conic Conformal Northing/Easting coordinates.
*
* This class encapsulates the methods for representing a geographic point on the earth in three different coordinate systema. Lat/Long, UTM and Lambert Conic Conformal.
*
* Code for datum and UTM conversion was converted from C++ code written by Chuck Gantz ([email protected]) from http://www.gpsy.com/gpsinfo/geotoutm/
* This code was converted into PHP by Brenor Brophy ([email protected]) and later refactored for PHP 5.3 by Hans Duedal ([email protected]).
*
$ git remote rm origin
$ git remote add origin [email protected]:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@mpijierro
mpijierro / download_csv.php
Last active October 28, 2024 06:45
Example streaming large CSV files with Laravel and thousands of queries
<?php
namespace Src\Csv;
use Illuminate\Http\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
/**
* Class DownloadLargeCsv
*