Skip to content

Instantly share code, notes, and snippets.

View ekhabarov's full-sized avatar

Eugene Khabarov ekhabarov

View GitHub Profile
@ekhabarov
ekhabarov / WORKSPACE
Created October 28, 2021 20:13 — forked from duarten/LICENSE
Baze rule for 99designs/gqlgen
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
rules_go_version = "0.19.1"
http_archive(
name = "io_bazel_rules_go",
sha256 = "8df59f11fb697743cbb3f26cfb8750395f30471e9eabde0d174c3aebc7a1cd39",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/{}/rules_go-{}.tar.gz".format(rules_go_version, rules_go_version),
"https://github.com/bazelbuild/rules_go/releases/download/{}/rules_go-{}.tar.gz".format(rules_go_version, rules_go_version),
@ekhabarov
ekhabarov / BUILD
Created March 9, 2021 21:50 — forked from rohansingh/BUILD
Invoking Tilt via Bazel
sh_binary(
name = "tilt",
srcs = ["tilt-wrapper.sh"],
args = ["up"],
data = select({
"@bazel_tools//src/conditions:darwin": ["@tilt_mac_x86_64//:tilt"],
"//conditions:default": ["@tilt_linux_x86_64//:tilt"],
}),
)
@ekhabarov
ekhabarov / introspection-query.graphql
Created December 2, 2019 20:01 — forked from craigbeck/introspection-query.graphql
Introspection query for GraphQL
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

#!/bin/bash
# Installs the XCode command line tools if you don't have them
xcode-select --install
# Installs brew if you don't have it
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Makes your account the owner of /usr/local, which is preferred on single user Macs
sudo chown -R `whoami` /usr/local
# Installs all the dependencies for building libtorrent and rtorrent
brew install automake libtool boost curl lzlib libsigc++ openssl
# Uninstall libtorrent-rasterbar if you already have it
@ekhabarov
ekhabarov / mac.sh
Created February 27, 2017 07:43
Disable bunch of #$!@ in Sierra
#!/bin/bash
# This is a draft but it works
# FIRST (I don't even know if it works but we'll assume yes)
# sudo launchctl list
# sudo launchctl disable system/netbiosd
# sudo launchctl disable system/parsecd
# sudo launchctl disable system/parentalcontrols.check
# sudo launchctl disable system/airportd
@ekhabarov
ekhabarov / mutt-gmail-yandex.md
Created August 27, 2016 20:22 — forked from lazyfrost/mutt-gmail-yandex.md
Configuring mutt to work with gmail and yandex
@ekhabarov
ekhabarov / gist:6faddc505206833f3698f984652f26a0
Created July 18, 2016 17:18 — forked from ruckus/gist:2293434
Basic setup of WAL-E for continuous archiving and recovery

WAL-E needs to be installed on all machines, masters and slaves.

How to install WAL-E

Only one machine, the master, writes WAL segments via continuous archiving. The configuration for the master postgresql.conf is:

archive_mode = on
archive_command = 'envdir /etc/wal-e.d/env wal-e wal-push %p'
archive_timeout = 60
@ekhabarov
ekhabarov / README.md
Created May 22, 2016 17:27 — forked from scy/README.md
My OSX PF config for #30C3.

My OS X “VPN only” Setup For #30C3

You should never let passwords or private data be transmitted over an untrusted network (your neighbor’s, the one at Starbucks or the company) anyway, but on a hacker congress like the #30C3, this rule is almost vital.

Hackers get bored easily, and when they’re bored, they’re starting to look for things to play with. And a network with several thousand connected users is certainly an interesting thing to play with. Some of them might start intercepting the data on the network or do other nasty things with the packets that they can get.

If these packets are encrypted, messing with them is much harder (but not impossible! – see the end of this article). So you want your packets to be always encrypted. And the best way to do that is by using a VPN.

Target audience

@ekhabarov
ekhabarov / x.sh
Created May 3, 2016 05:59
MacBook cycle count
system_profiler SPPowerDataType | grep "Cycle Count" | awk '{print $3}'