Skip to content

Instantly share code, notes, and snippets.

View sletix's full-sized avatar
💭
^^

Oleg Artamonov sletix

💭
^^
View GitHub Profile
some gist for store screens
Host 10.30.2.* 10.30.0.* 10.30.1.* 10.16.0.* 10.224.0.*
ForwardAgent yes
Hostname %h
User ubuntu
ProxyCommand ssh sletix@212.8.238.10 -W %h:%p
Host 10.31.0.* 10.31.1.*
ForwardAgent yes
Hostname %h
ProxyCommand ssh sletix@212.8.238.20 -q -W %h:%p
@sletix
sletix / requests.log
Created March 1, 2019 11:42
Запросы пользователя "1016 Гамарц Кристина Федоровна" на вход и выход из приложения "Автосалоны" ()
I, [2019-03-01T05:25:17.563553 #5581] INFO -- : [3a23916f-36d1-4ba6-a86f-77df9beea78f] @@debug: login action 1016 Гамарц Кристина Федоровна
I, [2019-03-01T05:34:33.295497 #20796] INFO -- : [4c3b8d9c-ebc0-4e94-a652-5cde7c20de76] @@debug: login action 1016 Гамарц Кристина Федоровна
I, [2019-03-01T05:39:53.095821 #20785] INFO -- : [44867dae-debb-47b0-b73d-b2c134c70961] @@debug: !logout! action 1016 Гамарц Кристина Федоровна
I, [2019-03-01T05:53:05.685491 #20802] INFO -- : [c81739d5-f153-4121-b95c-8939dc58edcd] @@debug: login action 1016 Гамарц Кристина Федоровна
I, [2019-03-01T05:53:58.078756 #20811] INFO -- : [e28ef965-7f18-4dda-bb32-f44faaabd791] @@debug: login action 1016 Гамарц Кристина Федоровна
I, [2019-03-01T06:14:20.167993 #29520] INFO -- : [7ed7c615-6529-4b0f-acd2-91d833ae74ba] @@debug: login action 1016 Гамарц Кристина Федоровна
I, [2019-03-01T07:11:00.082567 #24224] INFO -- : [ce6e9720-54b8-41e8-a259-5c960ca4c731] @@debug: login action 1016 Гамарц Кристина Федоровна
I, [2019-03-01T07:14:30.4301
@sletix
sletix / sql2slack.sh
Created August 18, 2017 18:56
sql2slack
#!/bin/bash
## settings: ----
# db
host="localhost"
db="dbname"
user="sletix"
password=""
# slack hook
slack_webhook="https://hooks.slack.com/services/XXXXXXX/XXXXXXX/YYYYYyyyyYYYYYyyyyYY"
#!/usr/bin/env ruby
class RightTSnitch
# change me
def render
"#{bloody} #{power}#{battery} (~#{@percents}%)"
end
def initialize
# Bind prefix to C-a
unbind C-b
set -g prefix C-b
# rebind prefix to using remote C-b (default) as single press, local C-a
bind C-R unbind C-b \; set -g prefix C-a \; display "Rebind to remote C-b; local C-a"
# clear and unbind
bind C-C unbind C-a \; set -g prefix C-b \; display "Rebind local C-a to C-b"
@sletix
sletix / private.xml
Created October 15, 2014 11:11
~/Library/Application Support/Karabiner/private.xml
<?xml version="1.0"?>
<root>
<item>
<name>Keymap for danish_dollar key :second</name>
<appendix>map: ± to ~ # for type home_path in console</appendix>
<identifier>key_to_key::danish_dollar_to_backquote</identifier>
<autogen>
__KeyToKey__
KeyCode::DANISH_DOLLAR, ModifierFlag::COMMAND_L,
KeyCode::BACKQUOTE, ModifierFlag::COMMAND_L
@sletix
sletix / ssh-socks-cheetsheet.md
Last active August 29, 2015 14:07
Cheetsheet: SSH SOCKS | OSX
  • Run ssh -D 9999 %user%@%host% command for connect via ssh and open something like socks server: Alt ssh-command-with-option-D

Bonus: You can use this ssh-session!, session need opened while you need socks-tunnel

  • Go to the System Preferences -> Network -> Advanced and check SOCKS Proxy, type localhost:9999: Alt ssh-command-with-option-D

  • DONE Alt ssh-command-with-option-D

You mac ready for web-serfing* through remote server!

@sletix
sletix / setup.sh
Last active December 22, 2015 06:08
setup console odesk-meter script
#!/usr/bin/env bash
#
# setup odesk-meter script
#
# to install ->
# foo@laptop ~/work $ bash <(curl -s https://raw.github.com/gist/6428595/setup.sh)
# - type your odesk login and password
# ...
#
# to use ->
@sletix
sletix / install.sh
Last active December 10, 2015 16:38
Install latest ruby from brightbox with chef ready gems
#!/usr/bin/env bash
#
# Install latest ruby from brightbox with gems
#
# tested on precise version, and brightbox ruby-1.9.1 package ready for:
# raring(13.04), quantal(12.10), precise(12.04), oneiric(11.10), lucid(10.04), natty(11.04), maverick(10.10)
#
# run this script on your ubuntu ~>
# `curl -L https://gist.github.com/raw/4462269 | sudo bash`
#