Skip to content

Instantly share code, notes, and snippets.

View davidzchen's full-sized avatar
💭
𝘈𝘥 𝘢𝘴𝘵𝘳𝘢 𝘱𝘦𝘳 𝘢𝘴𝘱𝘦𝘳𝘢.

David Z. Chen davidzchen

💭
𝘈𝘥 𝘢𝘴𝘵𝘳𝘢 𝘱𝘦𝘳 𝘢𝘴𝘱𝘦𝘳𝘢.
View GitHub Profile
@davidzchen
davidzchen / tmuxline
Created January 30, 2023 18:38
Current tmux status config
# This tmux statusbar config was created by tmuxline.vim
# on Thu, 05 Jan 2023
set -g status-justify "centre"
set -g status "on"
set -g status-left-style "none"
set -g message-command-style "fg=colour4,bg=colour0"
set -g status-right-style "none"
set -g pane-active-border-style "fg=colour4"
set -g status-style "none,bg=colour0"

Skylark rules

Rules

@davidzchen
davidzchen / rust.bzl.docstr.py
Last active December 7, 2015 10:46
rust.bzl with docstring-style inline documentation
# Copyright 2015 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@davidzchen
davidzchen / rust.bzl.doc-attr.py
Last active December 7, 2015 06:53
rust.bzl with inline documentation in doc attributes
# Copyright 2015 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@davidzchen
davidzchen / azkaban-json.json
Created June 22, 2014 05:13
Azkaban JSON-based DSL Syntax
{
"innerJobA": {
"type": "javaprocess",
"props": {
"job.class": "azkaban.executor.SleepJavaJob",
"seconds": 1,
"fail": "false"
}
},
"innerJobB": {
@davidzchen
davidzchen / azkaban-embedded-stripped.az
Last active August 29, 2015 14:02
Azkaban Stripped-Down Custom DSL Syntax
javaprocess('innerJobA') {
job.class = azkaban.executor.SleepJavaJob
seconds = 1
fail = false
property.with.variable = Name of class: ${job.class}
arithmetic = $($(1 + 3) - 2)
}
javaprocess('innerJobB') {
deps = innerJobA
@davidzchen
davidzchen / azkaban-embedded.properties
Last active August 29, 2015 14:02
Azkaban JProperties-based DSL
innerJobA.type = javaprocess
innerJobA.job.class = azkaban.executor.SleepJavaJob
innerJobA.seconds = 1
innerJobA.fail = false
innerJobA.property.with.variable = Name of class: ${job.class}
innerJobA.arithmetic = $($(1 + 3) - 2)
innerJobB.type = javaprocess
innerJobB.job.class = azkaban.executor.SleepJavaJob
innerJobB.deps = innerJobA
@davidzchen
davidzchen / azkaban-embedded.yml
Last active August 29, 2015 14:02
Azkaban YAML DSL Syntax
innerJobA:
type: javaprocess
job.class: azkaban.executor.SleepJavaJob
seconds: 1
fail: false
property.with.variable: "Name of class: ${job.class}"
arithmetic: (1 + 3) - 2
innerJobB:
type: javaprocess
@davidzchen
davidzchen / azkaban-embedded.az
Created June 20, 2014 23:42
Azkaban Custom DSL Syntax
javaprocess('innerJobA') {
job.class = 'azkaban.executor.SleepJavaJob'
seconds = 1
fail = false
property.with.variable = 'Name of class: ${job.class}'
arithmetic = (1 + 3) - 2
}
javaprocess('innerJobB') {
deps = ['innerJobA']
@davidzchen
davidzchen / sample_python.c
Last active August 29, 2015 13:56
Sample C code using the Python C coding style
/*
* Sample file using the Python C coding style
*
* http://legacy.python.org/dev/peps/pep-0007/
*
* General rules:
* - Use 4 spaces for indentation.
* - Each line must be at most 79 characters long.
* - Use C-style comments.
* - File names should be lower_case.c