Skip to content

Instantly share code, notes, and snippets.

View maikeruit's full-sized avatar
😎

Mihail maikeruit

😎
  • Russia
View GitHub Profile
@maikeruit
maikeruit / generate.fif
Created December 29, 2021 22:02 — forked from tvorogme/generate.fif
TON deploy smart contract
#!/usr/bin/fift -s
"TonUtil.fif" include
"Asm.fif" include
// If you dont know about stack-base languages
// Please read something before read comments and trying to understand what is going on here :)
5 :$1..n // parse arguments
$1 parse-workchain-id =: wc // set workchain id from command line argument
$2 parse-int =: subwallet-id // set subwallet id
@maikeruit
maikeruit / access_postgresql_with_docker.md
Created November 19, 2019 12:14 — forked from MauricioMoraes/access_postgresql_with_docker.md
Allow Docker Container Access to Host's Postgres Database on linux (ubuntu)

You have to do 2 things in order to allow your container to access your host's postgresql database

  1. Make your postgresql listen to an external ip address
  2. Let this client ip (your docker container) access your postgresql database with a given user

Obs: By "Host" here I mean "the server where docker is running on".

Make your postgresql listen to an external ip address

Find your postgresql.conf (in case you don't know where it is)

$ sudo find / -type f -name postgresql.conf

@maikeruit
maikeruit / postgres-dump-restore.markdown
Created December 14, 2018 13:48 — forked from jeremykendall/postgres-dump-restore.markdown
PostgreSQL: dump and restore (to db with different name and roles even)

Postgres Export and Import

Export

pg_dump -U [superuser] -Fc [dbname] > db.dump

Import

@maikeruit
maikeruit / janus.plugin.streaming.cfg
Created February 14, 2018 03:44 — forked from cfobel/janus.plugin.streaming.cfg
WebRTC Stream Logitech C920 through Janus gateway
; /opt/janus/etc/janus/janus.plugin.streaming.cfg
; [stream-name]
; type = rtp|live|ondemand|rtsp
; rtp = stream originated by an external tool (e.g., gstreamer or
; ffmpeg) and sent to the plugin via RTP
; live = local file streamed live to multiple listeners
; (multiple listeners = same streaming context)
; ondemand = local file streamed on-demand to a single listener
; (multiple listeners = different streaming contexts)
; rtsp = stream originated by an external RTSP feed (only