Skip to content

Instantly share code, notes, and snippets.

View bketelsen's full-sized avatar
💭
Making tools to make the tools.

Brian Ketelsen bketelsen

💭
Making tools to make the tools.
View GitHub Profile
@bketelsen
bketelsen / index.js
Last active July 30, 2020 14:46
github activity
const ghUserEvents = require('gh-user-events');
var watches = 0;
var comments = 0;
var pushes = 0;
var prs = 0;
var createRepos = 0;
var deleteRepos = 0;
var reviews = 0;
var issues = 0;
<div id="app">
<h1>{{ header }}</h1>
<p>Feel free to edit the HTML, JavaScript and CSS in this playground. The preview will update in real-time, so that
you can visually explore your ideas.</p>
<button @click="sayHi">Say Hi <span class="fa fa-heart" /></button>
</div>
strings ./v
%i.%i.%i
new array data is nil after malloc
bad insert
array index out of range: %d/%d
array first() for empty array
array last() for empty array
invalid slice index: %d > %d
array index out of range: %d / %d
"%.*s"
const handlerFunc = fn (event: u32) i8;
fn registerHandler(func: handlerFunc, [more]) void {
}
export fn dispatchEvent(id: u32) !void {
}
export const cstring = packed struct {
ptr: [*c]u8,
len: usize,
fn init(slice: []const u8) cstring {
return cstring{
.ptr = slice.ptr,
.len = slice.len
};
}
};
Processing triggers for man-db (2.8.4-2) ...
Setting up python-bcrypt (3.1.4-2build1) ...
Setting up python-jinja2 (2.10-1) ...
Setting up python-paramiko (2.4.1-0ubuntu3.2) ...
Setting up ansible (2.7.6-1ppa~cosmic) ...
sudo: the `-U' option may only be used with the `-l' option
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]
function _update_ps1() {
PS1="$(/home/bketelsen/bin/powerline-go -error $?)"
}
if [ "$TERM" != "linux" ] && [ -f "/home/bketelsen/bin/powerline-go" ]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi
@bketelsen
bketelsen / courseTemplate.js
Created January 1, 2019 20:56
gatsby graphql question
import React from "react";
import Link from "gatsby-link";
import { graphql } from "gatsby";
import Card from "../components/TOCLesson";
export default function Template(props) {
let { markdownRemark, allMarkdownRemark } = props.data; // data.markdownRemark holds our post data
const { frontmatter, html } = markdownRemark;
@bketelsen
bketelsen / setup.sh
Created December 13, 2018 14:01 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@bketelsen
bketelsen / brokenass.nim
Created November 24, 2018 17:49
observed attributes
import
dom, jsffi, jsconsole, macros, strutils,
nes
type
WelcomeProps = ref object of JsObject
prop1: cstring
type StringArray = array[0..1, cstring]