Skip to content

Instantly share code, notes, and snippets.

""" Rules to run controller-gen
"""
load("@io_bazel_rules_go//go:def.bzl", "go_context", "go_path")
load("@io_bazel_rules_go//go/private:providers.bzl", "GoPath")
def _controller_gen_impl(ctx):
go_ctx = go_context(ctx)
gopath = "$(pwd)/" + ctx.bin_dir.path + "/" + ctx.attr.gopath_dep[GoPath].gopath
output = ctx.actions.declare_file("output.go")
@ob
ob / pty.c
Created August 4, 2020 05:55
/* gcc test.c -lutil */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pty.h>
static int
do_fork(void)
{
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int ac, char *av[])
{
while (getopt(ac, av, "f:n:p:D:") != -1) {
// skip args
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>
@interface TestDumper : NSObject
@end
@implementation TestDumper
+ (void)load {
@ob
ob / Readme.txt
Last active April 11, 2019 00:49
Temp gist for images
Just for images

Set breakpoint

b <function>

Look at arguments (without knowing the calling convention)

register read $arg1

Use args to print all args

@ob
ob / full output
Created September 27, 2018 16:23
objc_library implicit dependencies
cc_library implicit dependencies
objc_lib has 577 objc_deps dependencies
cc_lib has 54 cc_deps dependencies
--- cc_deps 2018-09-27 08:56:39.000000000 -0700
+++ objc_deps 2018-09-27 08:56:39.000000000 -0700
@@ -1,13 +1,159 @@
-//:a.c
-//:cc
+//:a.m
@ob
ob / bazel_cc_test.sh
Created August 21, 2018 22:02
Bazel test cases
TEST_TMPDIR=`pwd`/cc
mkdir -p $TEST_TMPDIR
PATH=/Users/obonilla/o/bazel/bazel-bin/src:$PATH
set -ex
DFLG=""
test x"$DEBUG" = x || DFLG='--host_jvm_args="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005'
which bazel
extern crate curl;
extern crate futures;
extern crate time;
extern crate tokio_core;
extern crate tokio_curl;
extern crate tokio_timer;
use curl::easy::Easy;
use futures::Future;
use time::PreciseTime;
diff --git a/click/core.py b/click/core.py
index 1fcf415..ec7c569 100644
--- a/click/core.py
+++ b/click/core.py
@@ -694,13 +694,7 @@ class BaseCommand(object):
try:
try:
with self.make_context(prog_name, args, **extra) as ctx:
- try:
- rv = self.invoke(ctx)