Skip to content

Instantly share code, notes, and snippets.

Serg Podtynnyi shtirlic

Block or report user

Report or block shtirlic

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 keybase.md

Keybase proof

I hereby claim:

  • I am shtirlic on github.
  • I am shtirlic (https://keybase.io/shtirlic) on keybase.
  • I have a public key whose fingerprint is 8E9F DE81 F95E 7CE2 C672 6B79 9D70 05BA E592 87C2

To claim this, I am signing this object:

View shairport-sync.rb
class ShairportSync < Formula
desc "AirTunes emulator. Shairport Sync adds multi-room capability."
homepage "https://github.com/mikebrady/shairport-sync"
url "https://github.com/mikebrady/shairport-sync/archive/2.6.tar.gz"
sha256 "d04036241e5a811240c43a3ddfb05a119a6043e8c5f1f354872a88e6cbdaef07"
head "https://github.com/mikebrady/shairport-sync.git"
depends_on "pkg-config" => :build
depends_on "autoconf" => :build
depends_on "automake" => :build
View get-docker-socket-from-remote
#!/bin/bash
# get-docker-socket-from-remote <name> <user>@<host>
# Create a unix socket at /tmp/<name>-docker.sock which, when
# used will ssh to <user>@<host> and connect to the docker
# socket at <host>:///var/run/docker.sock
# Note:
# 1. This forks a subjob that manages the local socket.
# Rmember to kill that when your finished
@shtirlic
shtirlic / stm32_clocking.rb
Last active Aug 29, 2015
Clock calculation for STM32
View stm32_clocking.rb
require 'pp'
pp (2..15).map{|pllq| vco=pllq*48 ;{ {vco: vco,pllq: pllq} => [2,4,6,8].map{|pllp| { sysclk: vco/pllp,pllp: pllp }}}}
@shtirlic
shtirlic / dio.rb
Created Apr 15, 2013
Digital Ocean CLI on ruby Place it in ~/bin/dio
View dio.rb
#!/usr/bin/env ruby
require 'httparty'
require 'ostruct'
require "thor"
CLIENT_ID = ENV['DIGITAL_OCEAN_CLIENT_ID']
API_ID = ENV['DIGITAL_OCEAN_API_ID']
View mono-basic.rb
# http://www.mono-project.com/Compiling_Mono_on_OSX
require 'formula'
class MonoBasic < Formula
url 'http://download.mono-project.com/sources/mono-basic/mono-basic-2.10.tar.bz2'
homepage 'http://www.mono-project.com/'
View gist:5052306
set :stage, 'production'
set :shared_children, shared_children << 'tmp/sockets'
puma_sock = "unix://#{shared_path}/sockets/puma.sock"
puma_control = "unix://#{shared_path}/sockets/pumactl.sock"
puma_state = "#{shared_path}/sockets/puma.state"
puma_log = "#{shared_path}/log/puma-#{stage}.log"
namespace :deploy do
desc "Start the application"
@shtirlic
shtirlic / tsocks.rb
Created Feb 26, 2013
tsocks formula for homebrew
View tsocks.rb
require 'formula'
class Tsocks < Formula
# The original is http://tsocks.sourceforge.net/
# This GitHub repo is a maintained fork with OSX support
homepage 'http://github.com/pc/tsocks'
head 'https://github.com/pc/tsocks.git'
depends_on 'autoconf' => :build if MacOS.xcode_version.to_f >= 4.3
@shtirlic
shtirlic / prfunct.plugin.zsh
Last active Dec 15, 2016
Simple oh-my-zsh plugin for projects management
View prfunct.plugin.zsh
# Go to the project dir
prcd() {
project=$*
cd $PROJECTS_HOME/$project
}
# Create new project and cd in the project path and open ST
prnew() {
mkdir "$PROJECTS_HOME/$*" && cd "$PROJECTS_HOME/$*" && git init
}
@shtirlic
shtirlic / main.c
Created Feb 2, 2013
run mruby code
View main.c
#include <stdlib.h>
#include <stdio.h>
/* Include the mruby headers */
#include <mruby.h>
#include <mruby/proc.h>
#include <mruby/data.h>
#include <mruby/compile.h>
int main(int argc, const char * argv[])
You can’t perform that action at this time.