Skip to content

Instantly share code, notes, and snippets.

View g1ibby's full-sized avatar
🎯
Focusing

Sergey Varibrus g1ibby

🎯
Focusing
  • Worldwide
View GitHub Profile

Installing a Web Developer setup on OS X Mavericks

Install Command Line Tools

This is a requirement for brew in the next step. You can install XCode and then install Command Line Tools through the XCode preferences, or you can install just the Command Line Tools.

Install Command Line Tools

$ xcode-select --install
@g1ibby
g1ibby / README.md
Created February 2, 2016 16:36
Using local packages as composer dependencies

When implementing your project, the need for some module, library, service provider or something else will arise, and sometimes you’ll have to implement it yourself. So, how to do that? The solution to this problem is described here. I like this decision all but speed. Therefore, it was written this script that clones the local repository with the package into a folder of your project vendor.

registry:
restart: always
image: registry:2
ports:
- 5000:5000
environment:
REGISTRY_HTTP_TLS_CERTIFICATE: /certs/domain.crt
REGISTRY_HTTP_TLS_KEY: /certs/domain.key
REGISTRY_AUTH: htpasswd
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
# /etc/systemd/system/docker-compose-registry.service
[Unit]
Description=Docker Compose Registry Service
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
@g1ibby
g1ibby / lightsail-compose.sh
Last active December 20, 2018 14:46
Self host docker registry and decision problem docker mac os self sign certificates
#!/bin/bash
#https://container-solutions.com/adding-self-signed-registry-certs-docker-mac/
#https://docs.docker.com/registry/insecure/#use-self-signed-certificates
curl -sSL https://get.docker.com | sh
usermod -aG docker ubuntu
curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
@g1ibby
g1ibby / perfect.php
Created November 2, 2018 09:19 — forked from in4in-dev/perfect.php
PHP VK audio unmask (decode extras)
<?php
//(js -> php) code. letter by letter
global $n, $i, $id;
$n = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN0PQRSTUVWXYZO123456789+/=";
$id = 12345; //YOUR USER ID
$i = [
'v' => function($e) {
return strrev($e);
@g1ibby
g1ibby / docker-compose-tgmp.service
Created December 24, 2018 21:03
Telegram MTProto Docker compose
# /etc/systemd/system/docker-compose-tgmp.service
[Unit]
Description=Docker Compose tgmp Service
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes

Keybase proof

I hereby claim:

  • I am g1ibby on github.
  • I am g1ibby (https://keybase.io/g1ibby) on keybase.
  • I have a public key ASA6AYzVmQV_Gw7WY21nP6u7NNwWIHIUGki-RojMHGO6mAo

To claim this, I am signing this object:

@g1ibby
g1ibby / expdelay.go
Created September 20, 2019 16:23 — forked from powerman/expdelay.go
package expdelay
import "time"
// ExpDelay implements exponential delay.
type ExpDelay struct{ cur, max time.Duration }
// New returns new exponential delay which start with min delay, increase
// each next delay in 2 times up to max delay.
//
@g1ibby
g1ibby / docker-compose.yml
Created July 26, 2020 05:13
xBrowserSync self hosted: docker-compose, traefik v2
version: "3.3"
services:
traefik:
image: "traefik:v2.2"
container_name: "traefik"
command:
- "--api.insecure=true"
- "--providers.docker=true"