Skip to content

Instantly share code, notes, and snippets.

View gist:f2d4ddc30821d144a810
(defun f1 (arg)
(if (= (mod arg 2) 0)
arg
(+ arg 1)))
View gist:72a622a1ee91220bab6f
is_member(V, [V | _]) :- !.
is_member(V, [_ | T]) :-
is_member(V, T).
delete_element([], _V, []) :- !.
delete_element([V | T], V, T) :- !.
delete_element([V1 | T], V, [V1 | NT]) :-
delete_element(T, V, NT).
View gist:073081e329b95cb842b2
is_member(V, [V | _]) :- !.
is_member(V, [_ | T]) :-
is_member(V, T).
delete_element([], _V, []) :- !.
delete_element([V | T], V, NT) :-
!,
delete_element(T, V, NT).
delete_element([V1 | T], V, [V1 | NT]) :-
View swap_max_and_min
max([H | T], R) :-
max(T, H, R).
max([], R, R).
max([H | T], Temp, R) :-
H >= Temp,
!,
max(T, H, R).
max([_ | T], Temp, R) :-
max(T, Temp, R).
View gist:c781ae43a642e1011180
#include <unistd.h>
#include <stdio.h>
#include <sys/socket.h>
#include <sys/wait.h>
const int k_BufferSize = 255;
int main()
View docker-network.sh
docker network create -d bridge mynet
docker run --rm --name elastic --net mynet -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" docker.elastic.co/elasticsearch/elasticsearch:5.2.2
docker run --rm --name kibana --net mynet -p 5601:5601 -e ELASTICSEARCH_URL=http://elastic:9200 docker.elastic.co/kibana/kibana:5.2.2
View Example.md

Discipline

{
  "id": "uuid_discipline",
  "name": "Математические Вычиcления",
  ...
}
View keybase.md

Keybase proof

I hereby claim:

  • I am bbqtd on github.
  • I am bbqtd (https://keybase.io/bbqtd) on keybase.
  • I have a public key ASDnlGqpwJgQSrmsSEQriyIzPLPqCxI0YEjWSAoFaVSDfwo

To claim this, I am signing this object:

@bbqtd
bbqtd / macos-tmux-256color.md
Last active Jan 30, 2023
Installing tmux-256color for macOS
View macos-tmux-256color.md

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):