Skip to content

Instantly share code, notes, and snippets.

View ateleshev's full-sized avatar
🏠
Working from home

Artem Teleshev ateleshev

🏠
Working from home
View GitHub Profile
@ateleshev
ateleshev / disassembler.go
Created December 10, 2020 19:48 — forked from grantseltzer/disassembler.go
Full disassembler
package main
import (
"debug/elf"
"fmt"
"log"
"os"
"github.com/bnagy/gapstone"
)
#!/bin/bash
#
# Copyright (c) 2014, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
@ateleshev
ateleshev / git_rebase.md
Created July 23, 2018 08:51 — forked from ravibhure/git_rebase.md
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@ateleshev
ateleshev / Dockerfile
Created June 12, 2017 13:28 — forked from dghubble/Dockerfile
coreos-kvm
FROM ubuntu:16.10
MAINTAINER Dalton Hubble <dghubble@gmail.com>
ARG CL_CHANNEL
ARG CL_VERSION
COPY scripts /scripts
RUN /scripts/build
EXPOSE 2222
ENTRYPOINT ["/scripts/start"]
@ateleshev
ateleshev / kubeception.md
Created June 12, 2017 13:27 — forked from dghubble/kubeception.md
Running QEMU/KVM and Nested Kubernetes on Bare-Metal Kubernetes

%title: Kubeception %author: @dghubble

-> Kubeception

-> Experiments with QEMU/KVM on Kubernetes <-

-> Dalton Hubble <- -> @dghubble <-

@ateleshev
ateleshev / isChanClosed.go
Created May 17, 2017 11:56 — forked from joetIO/isChanClosed.go
Check if Go channel is closed without touching/reading it.
package main
import (
"fmt"
"unsafe"
"reflect"
)
func isChanClosed(ch interface{}) bool {
@ateleshev
ateleshev / gist:5827eedb04cdf8362b3b28ef467a9658
Created December 22, 2016 08:32 — forked from wikimatze/gist:9790374
Github Two-Factor Authentication Failed For HTTPS

I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.

Two-Factor Authentication

"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.

Enabling Two-Factor Authentication

@ateleshev
ateleshev / tar_test.c
Created December 15, 2016 08:45 — forked from danikin/tar_test.c
Tarantool Quick Test
// Tarantool quick test
// Copyright, Dennis Anikin 2016
//
// Quick disclaimer:
//
// This test shows 500K-1000K transactions per second on one CPU core
// and 600K-1600K queries per second on one CPU core.
//
// Based on the $6.57 per-month-price for the AWS t2.micro instance we can afford the tremendous number of 630bln queries for just $1
//
@ateleshev
ateleshev / epoll-main.go
Last active December 13, 2016 09:17 — forked from wolfeidau/main.go
Epoll example in golang starting point
package main
//
// Starting point is from http://gcmurphy.wordpress.com/2012/11/30/using-epoll-in-go/
//
import (
"fmt"
"os"
"syscall"
@ateleshev
ateleshev / epoll.go
Created December 13, 2016 09:14 — forked from tevino/epoll.go
Golang example for using epoll
package main
import (
"fmt"
"net"
"os"
"syscall"
)
const (