Skip to content

Instantly share code, notes, and snippets.

View lisovskyvlad's full-sized avatar

Lisovskii Vladislav lisovskyvlad

View GitHub Profile
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 10, 2025 09:21
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@mikhailov
mikhailov / nginx.conf
Last active October 7, 2018 10:15
Jira connection optimised (Nio enabled, gzip disabled on Tomcat, but enabled on Reverse proxy side, Proxy with HTTP 1.1 keep-alive, SSL offload, SPDY). Nginx 1.5.10+ recommended.
echo 'events {
worker_connections 1024;
}
error_log /usr/local/Cellar/nginx/1.5.8/error.log;
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
@mikhailov
mikhailov / sysctl.conf
Last active January 3, 2016 19:09
OS X Server TCP/IP tuning
net.inet.tcp.sack=1
net.inet.tcp.rfc1323=1
net.inet.tcp.recvspace=1048576
net.inet.udp.recvspace=1048576
net.inet.tcp.sendspace=1048576
net.inet.tcp.mssdflt=1460
net.inet.tcp.win_scale_factor=8
@ochronus
ochronus / commands.sh
Last active November 21, 2023 11:28
CPU and disk benchmarks
# install sysbench
$ apt-get install sysbench
# CPU benchmark, 1 thread
$ sysbench --test=cpu --cpu-max-prime=20000 run
# CPU benchmark, 64 threads
$ sysbench --test=cpu --cpu-max-prime=20000 --num-threads=64 run
# Disk benchmark, random read. See .fio files in this gist
@jsteiner
jsteiner / database_cleaner.rb
Created January 10, 2014 20:31
Database Cleaner
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
config.before(:each, js: true) do
module MA; end
module MB; end
module MC; end
module MD; end
module ME; end
class A; end
class B < A
include MA
@jvns
jvns / interview-questions.md
Last active April 17, 2025 16:25
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

@niquola
niquola / list.md
Last active May 20, 2018 04:52
Must Read from Ravil Bayramgalin (https://github.com/brainopia) + my small adds :)

Books

Concepts-Techniques-Models-Computer-Programming CMT это известная книжка CMT, за которой слава закрепилась не хуже чем у SICP

это из этой книжки классификация различных парадигм Если присмотришься, то увидишь, что Oz поддерживает большинство вариаций (с этой целью его и конструировали, чтобы можно было наглядно продемонстрировать различные подходы в одном языке)

@w495
w495 / multiplication.c
Created December 16, 2013 10:12
Умножение через сложение и сдвиг. Автор: студент первого курса Даниил Губарев.
#include <stdio.h>
int main(){
unsigned long a, b, c = 0, i = 0;
scanf("%lu%lu", &a, &b);
while (b != 0){
if (b & 1)
c += a << i;
i++;
b >>= 1;
#!/bin/bash
# ./encrypt.sh -keys public.pem private.pem
# ./encrypt.sh folder public.pem > decrypt-folder.sh
# chmod +x decrypt-folder.sh
# ./decrypt-folder.sh private.pem > folder.tar
#
#
# $ ./encrypt.sh
# Usage: ./encrypt-file.sh [directory] [public-key] > [decryption-script]