Skip to content

Instantly share code, notes, and snippets.

View vodolaz095's full-sized avatar

Остроумов Анатолий vodolaz095

View GitHub Profile
@vodolaz095
vodolaz095 / main.go
Created May 20, 2017 11:17
Example of how to host telegram bot on heroky
package main
import (
"gopkg.in/telegram-bot-api.v4"
"log"
"net/http"
"os"
)
func main() {
@vodolaz095
vodolaz095 / screencast.sh
Last active December 29, 2016 14:46
Simple bash script to record screencast with ffmpeg in high quality to local file
#!/bin/bash
if [ "$1" = '--help' ];then
echo 'Usage ./screencast.sh [filename]'
else
dimensions=`xdpyinfo | grep 'dimensions:'|awk '{print $2}'`
if [ -n "$1" ];then
outFile="$1"
else
outFile="$HOME/out.avi"
fi
@vodolaz095
vodolaz095 / guimessage.sh
Created December 4, 2016 09:58
Send message to users desctop using notify-send from remote console via SSH
#!/bin/bash
DISPLAY=:0.0 /bin/notify-send "$1"
@vodolaz095
vodolaz095 / authorized_keys
Created October 22, 2016 10:28
Authorized keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAcHKLMrD4T0N9aKruHTiAhmT2vO8KVByeFWPFvQ+50ZGeuQ9A0eKG8hZdvMsIKH7Xb0w5peTUoeI7xKQP1p6oqVZvXQLsqMdtIewkSMEESMDczl3embt+khxGozAWqQ1+c6zqEKwpCH04RK5Cp7pPYS+AHBx8i/KEVVxmrge+VpchuVNS9Yu9Hcl8H4/eE/tiWGLXi29mNQJ4egGmD0NsIu5mF0aWaFhumyupQZkEVlR/ShkDjoiG0LWcLlO65parePD3TsNhkh034+WaIVtj5T5tt13GiOGo/w5XKFiz3Mm+MxRVYKeg1CEXSACgu3MlNR6yFZgkDYElw6qAZZp1 vodolaz095@snow.local
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDumbiY/euFsYCD+l2bOcle18HS0X45zx2YH5eIHIQxIAWrJxIbEYYVg74JqSABw5h+/mUhocDe3PTskmXUQ9d7Z0YA2GyEAL+m85jXhP5zRoA9Gz5CBL4Rko0Uz5uA9ET868Gnx5J8R1tjSWYEsz9hEbTmXn9ermS03fasw8U53g9cfY197eSqP2Os+BioSPkuJbF8i164NW9i7IgCtTVyBWQWXq5q5wZyDQL5qAc12qlofTE/s7OLynS1/Iwx07G0z6bd0Pz1wscFqnKI7WRnho8rwsed5/Cni3p0r/nvnB2eBH6ktNoWplj9h09G76knjZvgvHdDpTi78KdSH7d vodolaz095@steel.local
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAtX0e7ey1x1PBsQbEGX9/0Avwah45Xd9cVfEo9xNuCYbMNptYL3ki/FVjRXzrtz8YEkUHGoNJ2bpcaeNm/RdGMK2vZw6FoZwsMN2ZFGrF42gWt0TYOXWVAfww2r0HNn3cvILxoRwEkZn5SivRTGRIZ6ego8AEUVKN/yx6EGQRMPvk8xDia
@vodolaz095
vodolaz095 / topten.sh
Created October 12, 2016 01:34
Show top 10 Shell commands you are using
#/bin/sh
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10
@vodolaz095
vodolaz095 / go-skype.go
Last active August 1, 2016 22:06
go-skype.go
package main
// Accessing last 10 messages in Skype using Golang.
//HOW TO RUN this application:
// 1. Install Go - https://golang.org/doc/install.
// 2. Instal dependencies by running in console
// go get github.com/jinzhu/gorm
<?xml version="1.0" encoding="UTF-8"?>
<!-- UPS XAV Service WSDL Release Date Dec 29, 2007 -->
<!-- Copyright 2007-2008 United Parcel Service of America, Inc. All rights reserved. -->
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:error="http://www.ups.com/XMLSchema/XOLTWS/Error/v1.1" xmlns:upss="http://www.ups.com/XMLSchema/XOLTWS/UPSS/v1.0" xmlns:xav="http://www.ups.com/XMLSchema/XOLTWS/xav/v1.0" xmlns:tns="http://www.ups.com/WSDL/XOLTWS/XAV/v1.0" targetNamespace="http://www.ups.com/WSDL/XOLTWS/XAV/v1.0">
<wsdl:types>
<!-- This schema defines the UPS Security header used for authorization purposes -->
<xsd:schema targetNamespace="http://www.ups.com/XMLSchema/XOLTWS/UPSS/v1.0" xmlns:upss="http://www.ups.com/XMLSchema/XOLTWS/UPSS/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:element name="UPSSecurity">
<xsd:complexType>
<xsd:sequenc
@vodolaz095
vodolaz095 / test.go
Created March 9, 2016 10:42
Some sort of test task
package main
import "fmt"
func main() {
var i int64
for {
i = i + 1
if i >= 200 {
break
@vodolaz095
vodolaz095 / mem.js
Created August 10, 2013 17:15
NodeJS modules are singletons
//A memory cache client for nodeJS
//It leaks memory and not scalable, DO NOT USE IN PRODUCTION!
//2 methods are utilized
// .get(key,function(err,value){})
// .set(key,value,function(err,resultOfSaving){},timeToLiveInMilliseconds)
var Storage = {};
exports.get = function (key, callback) {
if (Storage[key]) {
@vodolaz095
vodolaz095 / Dependencies.md
Last active February 11, 2016 18:17
Install dependencies required by some amazon related project

I assume you have actual Fedora 23 distro. For other distros scripts can differ

Build aws-apigateway-importer


	$ git clone https://github.com/awslabs/aws-apigateway-importer
	$ cd aws-apigateway-importer/
	$ sudo docker build -t aws-apigateway-importer .