Skip to content

Instantly share code, notes, and snippets.

Pavel Argentov argent-smith

Block or report user

Report or block argent-smith

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View policy-routing-example.rsc
# тут VPN-туннель
/ppp profile add change-tcp-mss=yes name=streisand-l2tp use-compression=yes use-encryption=yes use-mpls=no
/interface l2tp-client add allow=chap allow-fast-path=yes connect-to=167.99.211.56 disabled=no ipsec-secret=ribbon.armed.equip.hen.ocean max-mru=1500 max-mtu=1500 name=l2tp-streisand password=couch.monster.nose profile=streisand-l2tp use-ipsec=yes user=streisand
# сюда "набиваем" нужные префиксы
/ip firewall address-list add address=149.154.164.0/22 comment="telegram core" list=rkn-chan
/ip firewall address-list add address=103.246.200.0/22 comment="Blackberry Limited" list=rkn-chan
/ip firewall address-list add address=109.239.140.0/24 comment="Telegram Messenger LLP" list=rkn-chan
# тут главная фишка: прероут-руль, который пометит нужные пакеты роут-маркой
@argent-smith
argent-smith / opam_config.fish
Last active Sep 5, 2017
OCaml setup for Unikernel blog
View opam_config.fish
# OPAM configuration
set -gx PATH /Users/paul/.opam/system/bin $PATH
set -gx OCAML_TOPLEVEL_PATH /Users/paul/.opam/system/lib/toplevel
set -gx PERL5LIB /Users/paul/.opam/system/lib/perl5:$PERL5LIB
set -gx MANPATH $MANPATH /Users/paul/.opam/system/man
set -gx OPAMUTF8MSGS 1
set -gx CAML_LD_LIBRARY_PATH /Users/paul/.opam/system/lib/stublibs:/usr/local/lib/ocaml/stublibs
View gist:99e4fdbd83721060fc0f9af25664a3c6
~/Development/own/mirage/hello · (master)
⟩ make depend
opam pin add --no-action --yes mirage-unikernel-hello-macosx .
Package mirage-unikernel-hello-macosx does not exist, create as a NEW package ? [Y/n] y
mirage-unikernel-hello-macosx is now path-pinned to /Users/paul/Development/own/mirage/hello
[mirage-unikernel-hello-macosx] /Users/paul/Development/own/mirage/hello/ synchronized
[mirage-unikernel-hello-macosx] Installing new package description from /Users/paul/Development/own/mirage/hello
opam depext --yes mirage-unikernel-hello-macosx
@argent-smith
argent-smith / puma.rb
Created Feb 17, 2017
puma config template
View puma.rb
#!/usr/bin/env puma
require "pathname"
_num_workers = {{ ansible_processor_vcpus }}
_working_dir = Pathname.new("{{ deploy_to }}/current")
_rails_env = "{{ rails_env }}"
workers _num_workers
directory _working_dir.to_s
@argent-smith
argent-smith / .codeclimate.yml
Last active Feb 17, 2017
example codeclimate config
View .codeclimate.yml
---
engines:
brakeman:
enabled: true
bundler-audit:
enabled: true
csslint:
enabled: true
coffeelint:
enabled: true
View logs.txt
Feb 07 09:29:36 boinc audit[3706]: AVC avc: denied { create } for pid=3706 comm="rancher-net" scontext=system_u:system_r:svirt_lxc_net_t:s0:c234,c943 tcontext=system_u:system_r:svirt_lxc_net_t:s0:c234,c943 tclass=netlink_xfrm_socket permissive=1
Feb 07 09:29:36 boinc audit[3706]: SYSCALL arch=c000003e syscall=41 success=yes exit=7 a0=10 a1=3 a2=6 a3=0 items=0 ppid=3466 pid=3706 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rancher-net" exe="/usr/bin/rancher-net" subj=system_u:system_r:svirt_lxc_net_t:s0:c234,c943 key=(null)
Feb 07 09:29:36 boinc kernel: audit: type=1400 audit(1486459776.366:99): avc: denied { create } for pid=3706 comm="rancher-net" scontext=system_u:system_r:svirt_lxc_net_t:s0:c234,c943 tcontext=system_u:system_r:svirt_lxc_net_t:s0:c234,c943 tclass=netlink_xfrm_socket permissive=1
Feb 07 09:29:36 boinc kernel: audit: type=1300 audit(1486459776.366:99): arch=c000003e syscall=41 success=yes exit=7 a0=10 a1=3 a2=6 a3=0 items=0 ppid
View operations.ml
open Core_kernel
let setup_logging () =
let open Lwt_log in
default := broadcast [channel ~close_mode:`Keep ~channel:Lwt_io.stderr ()];
add_rule "*" Info
let threaded_function = fun pause ->
Lwt_unix.sleep pause
>> Lwt_log.info_f "Slept for %f" pause
View _oasis
OASISFormat: 0.4
Name: slackbot
Version: 0.0.1
Synopsis: Experimental slack bot in OCaml
Authors: Pavel Argentov (argentoff@gmail.com)
License: BSD-3-clause
Plugins: META (0.4), DevFiles (0.4), StdFiles (0.4)
AlphaFeatures: stdfiles_markdown
Executable slackbot
Path: src
View error.txt
Checker definition probably flawed.
Error while checking syntax automatically: (file-error "Writing to process" "bad file descriptor" #<process flycheck-ruby-rubocop>)
Saving file /Users/paul/Development/Evrone/authentica/app/services/data_utils/best_pick_setup.rb...
Wrote /var/folders/mx/p1090yj579bfmb2t3bvdvclc0000gn/T/.!Users!paul!Development!Evrone!authentica!app!services!data_utils!best_pick_setup.rb.~undo-tree~
Wrote /Users/paul/Development/Evrone/authentica/app/services/data_utils/best_pick_setup.rb
Suspicious state from syntax checker ruby-rubocop: Checker ruby-rubocop returned non-zero exit code 1, but no errors from output: invalid option: --cache
/Users/paul/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.32.1/lib/rubocop/options.rb:68:in `parse'
/Users/paul/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.32.1/lib/rubocop/cli.rb:21:in `run'
/Users/paul/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rubocop-0.32.1/bin/rubocop:13:in `block in <top (required)>'
/Users/paul/.rbenv/ver
@argent-smith
argent-smith / gist:5391009
Created Apr 15, 2013
Mongodb chef cookbook problem
View gist:5391009
[2013-04-15T20:17:15+00:00] INFO: Processing execute[apt-get update] action nothing (mongodb::10gen_repo line 28)
[2013-04-15T20:17:15+00:00] INFO: Processing apt_repository[10gen] action add (mongodb::10gen_repo line 32)
================================================================================
Error executing action `add` on resource 'apt_repository[10gen]'
================================================================================
RuntimeError
------------
The repository file to create is nil, cannot continue.
You can’t perform that action at this time.