Skip to content

Instantly share code, notes, and snippets.

View ch1c0t's full-sized avatar

Anatoly Chernov ch1c0t

View GitHub Profile
.check-wrapper(@click="check" :href="some")
.check #{name}
pug = require 'pug'
file = process.argv[2]
template = pug.compileFile file
console.log template name: 'Timothy'
diff --git a/lib/mutant/isolation/fork.rb b/lib/mutant/isolation/fork.rb
index e2476478..36130b62 100644
--- a/lib/mutant/isolation/fork.rb
+++ b/lib/mutant/isolation/fork.rb
@@ -61,8 +61,8 @@ module Mutant
# @return [Object]
def result
devnull.call do |null|
- stderr.reopen(null)
- stdout.reopen(null)
# https://www.linux.org.ru/forum/development/13492726
class Glob
def self.=== string
string.include? ?*
end
end
class MyHash < Hash
def initialize
unbind C-b
set -g prefix `
bind-key r source-file ~/.tmux.conf
require 'benchmark/ips'
class Array
def to_proc
if self[0].is_a? Symbol
method, *arguments = self
-> receiver { receiver.send method, *arguments }
elsif self[1].is_a? Symbol
receiver, method, *arguments = self
-> argument { receiver.send method, argument }
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.rej
*.swo
*.swp
*.vi
*~
*.sass-cache
@ch1c0t
ch1c0t / .gitconfig
Last active October 29, 2017 16:35
[user]
email = chertoly@gmail.com
name = Anatoly Chernow
[credential]
helper = cache --timeout=3600
[core]
excludesfile = ~/.gitignore_global
[alias]
co = checkout
br = branch
require 'pty'
require 'expect'
qemu_command = "qemu-system-x86_64 -enable-kvm -cdrom ~/alpines/alpine-virt-3.6.2-x86_64.iso -nographic"
PTY.spawn qemu_command do |r, w, pid|
p pid
r.expect /localhost login: / do |message|
puts "The message is #{message}."
CSV.read file, col_sep: "\t", quote_char: "\x00"