Skip to content

Instantly share code, notes, and snippets.

View lysenkooo's full-sized avatar
🏠
Remote

Denis Lysenko lysenkooo

🏠
Remote
View GitHub Profile
@lysenkooo
lysenkooo / gist:85296030d4ab93b4f8ed458003673bd0
Created July 4, 2020 12:32 — forked from g3d/gist:2709563
Clean Install – OS X 10.11 El Capitan
@lysenkooo
lysenkooo / btt_mute.scpt
Created June 28, 2020 13:13 — forked from mutantcornholio/btt_mute.scpt
BetterTouchTool mute toggle
tell application "BetterTouchTool"
if input volume of (get volume settings) = 0 then
update_trigger "E932FDB1-172A-4D4A-A710-5494CC41AB3D" json "{
\"BTTIconData\": \"TU0AKgAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@lysenkooo
lysenkooo / drawingproxy.js
Created April 18, 2020 16:24 — forked from simonkcleung/drawingproxy.js
Canvas Drawing Proxy
function DrawingProxy(ctx){
"use strict";
setContext(ctx);
var lastMethod, History, slice=Array.prototype.slice;
Object.defineProperty(Main,"context",{get : function(){return ctx}, set : setContext});
Object.defineProperty(Main,"$",{get : $});
import React from 'react'
const originalCreateElement = React.createElement
React.createElement = (el, props, ...children) => {
if (el.name === 'Provider') {
React.createElement.cond_stack = []
} else if (props) {
if (props.hasOwnProperty('if')) {
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "homebrew/services"
# Search tool like grep, but optimized for programmers
brew "ack"
# Library for command-line editing
brew "readline"
# Interpreted, interactive, object-oriented programming language
brew "python"
@lysenkooo
lysenkooo / aws_signed_request_v4.rb
Created May 16, 2018 13:27 — forked from blelump/aws_signed_request_v4.rb
Sample Ruby code to create AWS signed request version 4 (with request headers)
#Signing AWS Requests By Using Signature Version 4
#http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html
require 'uri'
require 'openssl'
require 'net/http'
require 'cgi'
method = 'GET'
service = 'iam'
@lysenkooo
lysenkooo / Vagrantfile
Created December 8, 2017 12:18
Docker Swarm Cluster
# -*- mode: ruby -*-
# vi: set ft=ruby :
MACHINES = {
'node01' => '192.168.56.101',
'node02' => '192.168.56.102'
}.freeze
Vagrant.configure(2) do |config|
config.vm.box = 'ubuntu/trusty64'
@lysenkooo
lysenkooo / app.rb
Created December 14, 2016 09:53
App Class
class Environment
def self.values
%w(debug development test staging production)
end
values.each do |env|
class_eval %Q{
def #{env}?
@env == :#{env}
end
@lysenkooo
lysenkooo / name_checker.rb
Created November 19, 2015 09:41
Domain Name Checker
#!/usr/bin/env ruby
require 'socket'
require 'whois'
zones = %w(com ru)
words = %w(
word1
word2
@lysenkooo
lysenkooo / bucardo
Last active August 29, 2015 14:09
CentOS Configurations
#!/bin/bash
### BEGIN INIT INFO
# Provides: bucardo
# Required-Start: $remote_fs $syslog postgresql-9.3
# Should-Start: postgresql-9.3
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Manage bucardo
# Description: Start, stop, restart bucardo