Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<CianFeed xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<feed_version>2</feed_version>
<object>
<ExternalId>1e42aea4-1538-ec11-a3ff-001dd8b71dec</ExternalId>
<Category>newBuildingFlatSale</Category>
<Address>г. Москва, Волоколамское шоссе, влд. 71/12</Address>
<Coordinates />
<Phones>
<PhoneSchema>
@33r01b
33r01b / openssl_commands.md
Created June 10, 2021 12:44 — forked from Hakky54/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
WITH m AS (
SELECT MAX(e.salary) max_salary, e.department_id
FROM employees AS e
GROUP BY e.department_id
)
SELECT e.first_name, e.last_name, e.salary,
d.name as department_name
FROM employees AS e
JOIN departments AS d ON e.department_id = d.id
WHERE EXISTS(SELECT 1 FROM m WHERE e.salary = m.max_salary AND e.department_id = m.department_id)
package main
import (
"context"
"fmt"
"log"
"net/http"
"sync"
"time"
)
@33r01b
33r01b / ssh.go
Created March 3, 2021 12:00 — forked from atotto/ssh.go
golang ssh terminal client
package main
import (
"context"
"flag"
"fmt"
"log"
"os"
"os/signal"
"syscall"
@33r01b
33r01b / Dockerfile
Created February 20, 2019 17:29 — forked from sophiaphillipa/Dockerfile
Configuring PHPStorm to work with xDebug and Docker, by listening.
FROM php:7-fpm
RUN apt-get update && \
apt-get install -y \
zlib1g-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev
@33r01b
33r01b / submodules.md
Created January 26, 2019 19:15 — forked from manasthakur/submodules.md
Using git submodules to version-control Vim plugins

Using git-submodules to version-control Vim plugins

If you work across many computers (and even otherwise!), it's a good idea to keep a copy of your setup on the cloud, preferably in a git repository, and clone it on another machine when you need. Thus, you should keep the .vim directory along with your .vimrc version-controlled.

But when you have plugins installed inside .vim/bundle (if you use pathogen), or inside .vim/pack (if you use Vim 8's packages), keeping a copy where you want to be able to update the plugins (individual git repositories), as well as your vim-configuration as a whole, requires you to use git submodules.

Creating the repository

Initialize a git repository inside your .vim directory, add everything (including the vimrc), commit and push to a GitHub/BitBucket/GitLab repository:

cd ~/.vim
@33r01b
33r01b / Laravel-Container.md
Created October 26, 2018 09:41
Laravel's Dependency Injection Container in Depth

Laravel's Dependency Injection Container in Depth

Translations: Korean (by Yongwoo Lee)

Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.

Introduction to Dependency Injection

I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).

@33r01b
33r01b / laravel_before_update_trigger.php
Last active October 24, 2018 13:17
add before update trigger on laravel
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddTrigger extends Migration
{
public function up()
{
DB::unprepared('
@33r01b
33r01b / postgres-cheatsheet.md
Created October 19, 2018 17:21 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)