Skip to content

Instantly share code, notes, and snippets.

View romansavrulin's full-sized avatar
❤️
Creating wonderful things

Roman Savrulin romansavrulin

❤️
Creating wonderful things
View GitHub Profile
@romansavrulin
romansavrulin / multiple_ssh_setting.md
Created July 30, 2019 16:56 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@romansavrulin
romansavrulin / # carthage - 2019-04-10_15-10-24.txt
Created April 10, 2019 12:10
carthage on macOS 10.14.4 - Homebrew build logs
Homebrew build logs for carthage on macOS 10.14.4
Build date: 2019-04-10 15:10:24
@romansavrulin
romansavrulin / gittruncatehistory.sh
Created January 8, 2018 19:08 — forked from magnetikonline/gittruncatehistory.sh
Truncate Git history to a specific SHA1, dropping everything before it.
#!/bin/bash -e
# Lifted from: https://github.com/adrienthebo/git-tools/blob/master/git-truncate
# Note: seem to be finding the need to run this twice over to commit the truncate
if [[ (-z $1) || (-z $2) ]]; then
echo "Usage: $(basename "$0") <drop before SHA1 commit> <branch>"
exit 1
fi
git filter-branch --parent-filter "sed -e 's/-p $1[0-9a-f]*//'" \
@romansavrulin
romansavrulin / disk_wipe.sh
Created December 20, 2015 16:21 — forked from Kromey/disk_wipe.sh
This simple Bash script functions as a wrapper around dd, for the purpose of wiping a disk or partition while providing progress feedback to the user.
#!/bin/bash
# disk_wipe.sh
# Author: Kromey (http://kromey.us/)
# This simple Bash script leverages the dd utility to provide user feedback
# as progress is made, designed for the purpose of wiping hard drives or
# partitions. This script reads from /dev/zero to most efficiently zero-out
# the target device or partition.
#
# BEGIN CONFIG
@romansavrulin
romansavrulin / stdin_stream.hpp
Last active August 29, 2015 14:26 — forked from kikairoya/stdin_stream.hpp
boost::asio AsyncReadStream for console input
class stdin_stream: boost::noncopyable {
typedef boost::function<void (const boost::system::error_code &, size_t bytes_transferred)> read_handler_type;
public:
stdin_stream(boost::asio::io_service &io, HANDLE hin): io(io), hin(hin), hev(CreateEvent(0, 0, 0, 0)), handler(), buffer(0), size(0) {
_beginthread(&stdin_stream::thread_handler_gateway, 0, this);
}
~stdin_stream() {
buffer = 0;
CloseHandle(hev);
}