Skip to content

Instantly share code, notes, and snippets.

View enomado's full-sized avatar

Stanislav enomado

View GitHub Profile
@suhr
suhr / proofs.md
Last active December 8, 2022 13:05

Упражнения по формальным доказательствам

Нет времени объяснять, переходим сразу к делу.

Инструменты

Доказывать теоремы мы будем, используя интерактивные пруверы Isabelle или Lean 3. Примеры приводятся для каждого прувера, для решения задач же можно использовать любой из них.

@YBogomolov
YBogomolov / session.ts
Last active November 26, 2022 16:45
Session types for TypeScript
// Inspired by https://github.com/Munksgaard/session-types
interface Chan<Env, Protocol> {
env_and_protocol: [Env, Protocol];
}
class Eps implements HasDual {
readonly tag: 'Eps' = 'Eps';
readonly dual!: Eps;
}
@varyen
varyen / vue-noindex.js
Last active March 27, 2019 19:14
Vue component: prevent childs from indexing by crawlers
export default {
name: 'NoIndex',
functional: true,
props: {
tag: {
type: String,
default: 'div',
},
@robballou
robballou / .babelrc
Created January 26, 2018 21:37
Using new babel with shippedProposals
{
"presets": [
[
"@babel/env",
{
"targets": {
"node": "current"
},
"shippedProposals": true
}
@sirsquidness
sirsquidness / proxy.conf
Created September 22, 2016 12:42
How to have nginx proxy_pass follow upstream 302 redirects (eg, when you're running a steam cache and you're behind Cox's layer 7 interception stuff)
# This config came around after a friend had problems with a Steam cache on his
# Cox internet connection. Cox would intercept any requests to Steam content
# servers and return a 302 to Cox's servers. The cache would return the 302
# to the Steam client, and the Steam client would go directly to Cox, bypassing
# the cache.
# This config makes nginx follow the 302 itself, and caches the result of the
# redirect as if it was the response to the original request. So subsequent
# requests to the URL that returned a 302 will get the file instead of a 302.
@fillest
fillest / asd.py
Last active July 10, 2019 09:59
python_some_module_level_scope_hack
import some_module
some_module.surprise_global = ["sgushenka"]
some_module.test()
# $ python -c 'import asd'
# ['sgushenka']
@smrchy
smrchy / README.md
Last active March 24, 2022 22:50
Sort a SQL query with id and parentid so that the rows have the correct order of the tree.

_queryTreeSort

Note: Please check this blog post for more details on these functions.

Sort a SQL query with id and parentid so that the rows have the correct order of the tree.

Parameters:

  • q (Array): A query result (see example below)
@imankulov
imankulov / watchmedo.sh
Created March 26, 2013 19:37
One-liner. Auto-building Sphinx docs with watchdog. Forked from http://jacobian.org/writing/auto-building-sphinx/
# pip install watchdog
exec watchmedo shell-command --patterns='*.rst;*.py' --ignore-pattern='_build/*' --recursive --command='make html' --wait
@endolith
endolith / Has weird right-to-left characters.txt
Last active May 18, 2024 22:32
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶