Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:

Tyler Rockwood rockwotj

:shipit:
View GitHub Profile
View gist:c6b7a8308729ce07d8cbfec10f21bd90
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
#root {
display:flex;
flex-direction: column-reverse;
overflow-y: scroll;
height: 300px;
@rockwotj
rockwotj / BUILD.bazel
Created Jun 22, 2022
BUILD.bazel for Mimalloc to use in cc_binary(malloc = ...)
View BUILD.bazel
cc_library(
name = "mimalloc",
srcs = ["src/static.c"],
textual_hdrs = glob(["src/*.c", "src/*.h"], exclude = ["src/static.c"]),
hdrs = glob(["include/*.h"]),
includes = ["include"],
copts = ["-DMI_MALLOC_OVERRIDE"],
visibility = ["//visibility:public"],
)
@rockwotj
rockwotj / Contents.json
Created Jun 18, 2022
iphone svg asset json file
View Contents.json
{
"images" : [
{
"filename" : "test.svg",
"idiom" : "iphone"
}
],
"info" : {
"author" : "xcode",
"version" : 1
@rockwotj
rockwotj / Foo.h
Last active Apr 3, 2021
Generated ObjC Swift Interface
View Foo.h
SWIFT_CLASS("_TtC3Foo9TestClass")
@interface TestClass : NSObject
- (void)fooWithLabel:(NSString * _Nonnull)arg;
- (void)foo1:(NSString * _Nonnull)arg;
- (void)barWithLabel:(NSString * _Nonnull)arg other:(NSInteger)ar;
- (void)bar1:(NSString * _Nonnull)arg other:(NSDictionary<NSString *, id> * _Nonnull)ar;
- (void)quxWithLabel:(NSString * _Nonnull)arg :(NSInteger)ar;
- (void)qux1:(NSString * _Nonnull)arg :(NSArray * _Nonnull)ar;
- (void)thudWithArg:(int64_t)arg ar:(double)ar;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
View .SC2Hotkeys
[Settings]
Grid=1
Suffix=_GLS
[Hotkeys]
PTT=
AlertRecall=
ArmySelect=Grave
IdleWorker=Shift+Grave
TargetChoose=LeftMouseButton,Z
View scratch.bookmarklet
data:text/html, <html contenteditable style="font-family: courier">
@rockwotj
rockwotj / rtdb_load.py
Last active Jun 28, 2017
An example in python on using the Stackdriver Monitoring API to query your Firebase Realtime Database's average load over the past day
View rtdb_load.py
# Copyright 2017 Google Inc.
#
# 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
#
# https://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,
View MyFunctions.scala
package com.google.functions.examples.scalajs
import scala.scalajs.js.annotation._
import scala.scalajs.js
import js.DynamicImplicits._
@js.native
trait Request extends js.Any {
val body: js.Dictionary[Any] = js.native
}
View download-jar.py
#!/usr/bin/env python
import sys
import os
import argparse
from os import path
from os.path import isfile as exists
import signal
import json
import xml.etree.ElementTree as ET
@rockwotj
rockwotj / motd.sh
Created Jan 6, 2017
Raspberry Pi motd
View motd.sh
#!/bin/bash
clear
function color (){
echo "\e[$1m$2\e[0m"
}
function extend (){
local str="$1"