Skip to content

Instantly share code, notes, and snippets.

View stakira's full-sized avatar

StAkira stakira

  • San Francisco, CA
View GitHub Profile
import Foundation
extension UIViewController {
func st_setNavigationBarTheme() {
if let nav = self.navigationController?.navigationBar {
// Colors
nav.translucent = false
nav.barTintColor = UIColor.whiteColor() // themeColor
nav.titleTextAttributes = [
@stakira
stakira / gfm_table.css
Last active April 6, 2019 02:56
GFM table
body {
text-size-adjust: 100%;
color: #333;
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
font-size: 16px;
line-height: 1.6;
word-wrap: break-word;
}
@stakira
stakira / luajit_mat2d.c
Last active September 26, 2021 12:08
LuaJIT FFI 2D matrix with continuously allocated data array.
#include <cinttypes>
extern "C" {
__declspec(dllexport) void array_to_mat2d_byte(unsigned char* data, unsigned char** mat, size_t w, size_t h) {
for (size_t i = 0; i < w; ++i) {
mat[i] = data + h * i;
}
}