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
# https://isotope11.com/blog/linux-from-scratch-part-1 | |
# http://nairobi-embedded.org/transfering_buildroot_fs_data_into_qemu_disk_images.html | |
IMAGE=disk-img.raw | |
IMAGE_SIZE=8.1G | |
# 6 Gig ext2, 2 Gig Swap, 100meg boot | |
$(IMAGE): | |
qemu-img create -f raw $(IMAGE) $(IMAGE_SIZE) | |
loop0: $(IMAGE) | |
sudo losetup /dev/loop0 $(IMAGE) |
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
DO $$ | |
declare | |
x node%rowtype; | |
begin | |
for x in SELECT * FROM node | |
loop | |
RAISE NOTICE 'hello ...% %', pg_typeof(x), x; | |
end loop; | |
end; |
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 pprint | |
import ast | |
from ast import ClassDef, FunctionDef, Assign | |
with open("path/to/class/file.py", 'r') as supplier_file_data: | |
tree = ast.parse(supplier_file_data.read()) | |
print(dir(tree)) | |
classes = (e for e in tree.body if isinstance(e, ClassDef)) | |
def get_values(class_tree): |
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 re | |
entries = (entry for entry in lst[1:]) | |
lookup = ["Sundays", | |
"Mondays", | |
"Tuesdays", | |
"Wednesdays", | |
"Thursdays", | |
"Fridays", | |
"Saturdays", |
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
package main | |
import ( | |
"fmt" | |
"github.com/golang/protobuf/proto" | |
) | |
type Mapable interface{ | |
Map(interface{}) Mapable | |
} |
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
package main | |
import ( | |
"database/sql" | |
"fmt" | |
_ "github.com/go-sql-driver/mysql" | |
"github.com/golang/protobuf/proto" | |
) | |
var ( |
(require 'ert)
(require 'org-id)
;; (setq load-file-name "~/.emacs.d/github/ob-go/")
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
(seq-let [first &rest body ] "hello" | |
(message "%s .. %s" first body)) | |
"104 .. ello" | |
(seq-let [ :hello x :other-val [ a b c ]] '(:hello 12 :other-val [10 32 210]) | |
(message "%S!!!" (list x a b c))) | |
"(12 10 32 210)!!!" |