Skip to content

Instantly share code, notes, and snippets.

@shinka-cb
shinka-cb / Beerstack.rb
Last active August 29, 2015 14:04
Infinite Beer
class Array
def pop # Overrides original Array class
"🍺" # Just Beer
end
end
beerstack = Array.new
loop do
print beerstack.pop
@kendellfab
kendellfab / read_line.go
Created November 11, 2013 17:41
Golang --> Read file line by line.
func readLine(path string) {
inFile, _ := os.Open(path)
defer inFile.Close()
scanner := bufio.NewScanner(inFile)
scanner.Split(bufio.ScanLines)
for scanner.Scan() {
fmt.Println(scanner.Text())
}
}
@PawelJagus
PawelJagus / md5algorithm.abap
Created July 19, 2012 17:22
MD5 algorithm in ABAP with Update function
*&---------------------------------------------------------------------*
*& Report ZZZ
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zzz.
@mydoghasworms
mydoghasworms / json_util.abap
Last active February 19, 2023 14:46
ABAP Utility class for mapping JSON to ABAP data and vice versa - Rather use https://gist.github.com/mydoghasworms/4888a832e28491c3fe47
* Rather use https://gist.github.com/mydoghasworms/4888a832e28491c3fe47
* The alternative is a better parser although it is not an emmitter)
*----------------------------------------------------------------------*
* CLASS json_util DEFINITION
*----------------------------------------------------------------------*
class json_util definition.
public section.
class-methods:
data_to_json importing data type any
returning value(json) type string,