Skip to content

Instantly share code, notes, and snippets.

@Heavyblade
Heavyblade / metadata.json
Created July 20, 2019 16:12
metadata.json
[{"id":"cirrusdat/CIRRUS_CAMPOS","name":"campos","editable":true,"singleName":"campos","desc":"","project":"cirrusdat","tableType":0,"inMemory":false,"fields":[{"id":"ID","name":"Code","type":6,"bindType":0,"bindTypeName":"none","fieldBoundedTableId":"","fieldIsSigned":false,"fieldDecimals":0,"fieldMaximumValue":16777215,"fieldMinimumValue":0,"hidden":false},{"id":"NAME","name":"Name","type":1,"bindType":0,"bindTypeName":"none","fieldBoundedTableId":"","fieldIsSigned":false,"fieldDecimals":0,"fieldMaximumValue":0,"fieldMinimumValue":0,"hidden":false},{"id":"TABLAS","name":"tabla","type":6,"bindType":1,"bindTypeName":"maestra","fieldBoundedTableId":"3ppd4qwn.vcd@CIRRUS_TABLAS","fieldIsSigned":false,"fieldDecimals":0,"fieldMaximumValue":65535,"fieldMinimumValue":0,"hidden":false},{"id":"INCLUIR","name":"Incluir","type":10,"bindType":0,"bindTypeName":"none","fieldBoundedTableId":"","fieldIsSigned":false,"fieldDecimals":0,"fieldMaximumValue":0,"fieldMinimumValue":0,"hidden":false},{"id":"IDREF","name":"idRef","ty
@Heavyblade
Heavyblade / ruby_questions.rb
Created July 3, 2019 20:36
ruby_questions.rb
Ruby Interview Questions
Ruby
What is a class?
What is an object?
How is the method lookup performed in Ruby? ***
What's the purpose of method missing and how does it work? Tiene la idea
How do you support multi inheritance in Ruby?
What's the difference between include and extend?
@Heavyblade
Heavyblade / datatypes.go
Created June 13, 2019 12:33
datatypes.go
package main
import (
"C"
)
func main() {
}
//export EchoInt
@Heavyblade
Heavyblade / hello_dll.go
Created June 11, 2019 17:43
hello_dll.go
package main
import "fmt"
import "C"
func main() {}
//export SayHello
func SayHello(message *C.char) *C.char {
goMessage := C.GoString(message)
@Heavyblade
Heavyblade / hello.go
Last active June 11, 2019 20:57
hello.go
package main
import "fmt"
func main() {
fmt.Println(sayHello("world"))
}
func sayHello(message string) string {
return "hello " + message
@Heavyblade
Heavyblade / dig.rb
Last active June 4, 2019 21:50
dig.rb
def dig(row,array_of_keys)
return row if array_of_keys.count == 0
current = case row
when Hash
current = row[array_of_keys.shift]
when Array
current = (row.find { |x| x.key?(key)} ||{})[key]
else
nil
end
@Heavyblade
Heavyblade / hash.rb
Created June 4, 2019 20:54
hola_hasg.rb
row = {nivel1: {
nivel2: {
nivel3: {
hola: "mundo"
}
}
}
}
func main() {
/*user := C.CString("foo")
pass := C.CString("pass")
remote := C.CString("127.0.0.1")
port := C.CString("2222")
//pattern := C.CString("/upload")
fromPath := C.CString("/upload/2019040900050927.pdf")
toPath := C.CString("/upload/public/locales/my_pdf.pdf")
//toPath := C.CString("/upload/views/copy_2019040900050927.pdf")
@Heavyblade
Heavyblade / vajax.js
Created May 16, 2019 19:46
improve vajax text file handling
importClass("XMLHttpRequest");
importClass( "VFile" );
importClass("VTextFile");
function readFile(path) {
var isText = path.match(/\.(xml|json|csv|txt|html|html)$/) !== null ,
fi = isText ? (new VTextFile(path)) : (new VFile(path)),
fileInfo;
if ( fi.open( VFile.OpenModeReadOnly ) ) {
@Heavyblade
Heavyblade / main.go
Created April 5, 2019 17:39
main.go
package main
import (
"C"
gosxnotifier "github.com/deckarep/gosx-notifier"
)
//export Notify
func Notify(x *C.char) bool {