This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TodoApi | |
{ | |
/// <summary> | |
/// A generic result class that should enough | |
/// to get rid of exceptions and be general enough | |
/// for handling all kind of errors. | |
/// | |
/// User is forced to handle error case to get success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MyClass() abort | |
let this = {} | |
function this.setA() dict | |
let self.a = 1100 | |
endfunc | |
function this.method() dict | |
return self.a | |
endfunc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nums = [ | |
(lambda f, x: x), | |
(lambda f, x: f(x)), | |
(lambda f, x: f(f(x))), | |
] | |
result = 0 | |
calls = [] | |
def f(x): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class sym: | |
def __init__(self, name): | |
self.name = name | |
def __str__(self): | |
return f":{self.name}" | |
def builtin_func(name): | |
def inner(f): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ast import ( | |
NodeTransformer, | |
arguments, | |
arg, | |
Lambda, | |
parse, | |
In, | |
Call, | |
Expression, | |
fix_missing_locations, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from sly import Lexer, Parser # type: ignore | |
from collections.abc import Iterable | |
# lamb -> LAMB ID DOT term | |
# lamb -> appl | |
# appl -> appl term | |
# appl -> term | |
# term -> LPAR lamb RPAR | |
# term -> ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from sly import Lexer, Parser | |
from collections.abc import Iterable | |
# lamb -> LAMB ID DOT term | |
# lamb -> appl | |
# appl -> appl term | |
# appl -> term | |
# term -> LPAR lamb RPAR | |
# term -> ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval((位x.x) 1) | |
eval((位x.x)) | |
eval(1) | |
appl((位x.1), 1) => 1 | |
eval((位x.(位y.x)) 1 2) | |
eval((位x.(位y.x)) 1) | |
eval((位x.(位y.x))) | |
eval(1) | |
appl((位x.(位y.1)), 1) => (位y.1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/Users/gecko/code/deployment/minsible | |
- debug: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Wrapper over ansible include tasks to make simple executable playbooks | |
# example https://gist.github.com/e39284344e3fd29b3202571678b6a343 | |
task="${PWD}/$1" | |
ansible localhost -m include_tasks -a file=$task -c local -i /dev/null |