Skip to content

Instantly share code, notes, and snippets.

View spudro228's full-sized avatar
👌
Bussy

Dmitry Smolyakov spudro228

👌
Bussy
  • Russia
View GitHub Profile
@spudro228
spudro228 / app.ts
Created November 18, 2019 15:32
request
this.tramwayApiService.getTeacher()
.pipe(
concatMap(
res => this._httpClient.get<Response>('https://tramway.skyeng.loc/api/file-storage/teachers/profileFilesIsUploaded?teacherId=' + res.data.id)
)
).subscribe(
response => {
console.log(response)
}
)
sudo apt-get purge nvidia*
sudo apt-get install xserver-xorg-video-nouveau
sudo reboot
import org.jetbrains.kotlin.gradle.dsl.Coroutines
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val ktor_version: String by project
val kotlin_version: String by project
val logback_version: String by project
plugins {
application
kotlin("jvm") version "1.3.20"
<?php
declare(strict_types=1);
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Finder\Finder;
require_once 'vendor/autoload.php';
<?php
$code = <<<'CODE'
protected $baseUrl = '/api/countries';
$client->request('GET', $this->baseUrl . "kek");
$client->request('GET', $this->baseUrl.'kek');
@spudro228
spudro228 / CanITestIt.php
Last active December 19, 2018 17:35
HowCanITestIt.php
<?php
class Acme {
public funcltion foo($param): void{
if($this->canDoIt($param) === false){
return;
}
//some logic
@spudro228
spudro228 / main.c
Last active December 17, 2018 08:45
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>
#include <linux/fb.h>
@spudro228
spudro228 / TestListener.php
Last active December 13, 2018 07:45
test event listener
<?php
public function test_was_called()
{
$eventDispatcher = new EventDispatcher();
$mockLlistener = $this->createMock(Listener::class);
$mockListener
->expects($this->once())
->method('onData');
#define BOOST_ASIO_HAS_BOOST_CHRONO
#define BOOST_CHRONO_HAS_CLOCK_STEADY
#include <boost/asio/io_service.hpp>
#include <boost/asio/write.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/asio/ssl.hpp>
#include <boost/bind.hpp>
@spudro228
spudro228 / gist:58f1a14a8b8a54d7e6588ff5bfa1620d
Created June 24, 2017 16:39
install php7.1 in fedora 25
sudo dnf install https://rpms.remirepo.net/fedora/remi-release-25.rpm
sudo dnf --enablerepo=remi --enablerepo=remi-php71 install httpd php php-common --best --allowerasing
sudo dnf --enablerepo=remi --enablerepo=remi-php71 install php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongodb php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml