Skip to content

Instantly share code, notes, and snippets.

View karlbunch's full-sized avatar

Karl Bunch karlbunch

View GitHub Profile
#!/usr/bin/python
import Foundation
import objc
import AppKit
import sys
NSUserNotification = objc.lookUpClass('NSUserNotification')
NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter')
@karlbunch
karlbunch / init.go
Last active August 29, 2015 14:08 — forked from saljam/init.go
// +build linux
package main
import (
"log"
"time"
"syscall"
"errors"
"os"
"os/exec"
@karlbunch
karlbunch / test_luajit.go
Last active August 29, 2015 14:12 — forked from benbjohnson/lj.go
package main
/*
#cgo CFLAGS: -I/usr/local/include
#cgo LDFLAGS: -L/usr/local/lib -lluajit-5.1
#include <stdlib.h>
#include <stdio.h>
#include <luajit-2.0/lua.h>
#include <luajit-2.0/lualib.h>
#include <luajit-2.0/lauxlib.h>
@karlbunch
karlbunch / gfm2html.sh
Created January 10, 2016 18:47 — forked from evertton/gfm2html.sh
Convert a Github Flavored Markdown Syntax file to HTML
#!/bin/bash
# Convert a Github Flavored Markdown Syntax file to HTML
#
# The MIT License (MIT)
# Copyright © 2012 Evertton de Lima <[email protected]>
# http://evertton.mit-license.org/
# Stylesheet feature by Dan Untenzu <[email protected]>
#
# Requirements: cURL (sudo apt-get install curl)
@karlbunch
karlbunch / Makefile
Created March 7, 2016 13:00 — forked from toolmantim/Makefile
An example of using Make instead of Grunt for fast, simple and maintainable front-end asset compilation.
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
@karlbunch
karlbunch / README.md
Created April 12, 2016 11:04 — forked from robschmuecker/README.md
D3.js Drag and Drop, Zoomable, Panning, Collapsible Tree with auto-sizing.

This example pulls together various examples of work with trees in D3.js.

The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.

One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.

Dragging can be performed on any node other than root (flare). Dropping can be done on any node.

Panning can either be done by dragging an empty part of the SVG around or dragging a node towards an edge.

@karlbunch
karlbunch / boot-from-ram-debian.md
Created September 10, 2017 10:18 — forked from avinash-oza/boot-from-ram-debian.md
How to boot from RAM on debian
@karlbunch
karlbunch / user-data.txt
Created October 6, 2017 18:03 — forked from heri16/user-data.txt
Docker-CE Cloud-init for Ubuntu 16.04 (LTS)
#cloud-config
# Upgrade the instance on first boot
# (ie run apt-get upgrade)
#
# Default: false
# Aliases: apt_upgrade
package_upgrade: true
# Install additional packages on first boot
@karlbunch
karlbunch / disable_spectre.md
Created June 19, 2021 18:35 — forked from rizalp/disable_spectre.md
Disable Spectre/Meltdown Mitigation

In /etc/default/grub, modify:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off tsx=on tsx_async_abort=off mitigations=off"

Then sudo update-grub

# checkout
git fetch origin refs/meta/config:refs/remotes/origin/meta/config
git checkout meta/config
#directly:
git push origin meta/config:meta/config
#via review:
git push origin meta/config:refs/for/refs/meta/config