Skip to content

Instantly share code, notes, and snippets.

View karlbunch's full-sized avatar

Karl Bunch karlbunch

View GitHub Profile
@karlbunch
karlbunch / long2ip.sh
Last active July 19, 2021 10:37
Quick way to convert integer ip4 ip address to dot notation
#!/bin/bash
#
# long2ip - Bash example to convert integer ip to long
#
# Example: long2ip 201691728
#
long2ip() {
local ip=$1
echo $((ip >> 24 & 255))"."$((ip >> 16 & 255))"."$((ip >> 8 & 255 ))"."$((ip & 255))
#!/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 / backtrace.txt
Last active May 7, 2016 22:51
2048x1152 crash /teleport 0 0 dantooine
0x00aa1e3f: int $3
Modules:
Module Address Debug info Name (278 modules)
PE 400000- 19bf000 Export swgemu
PE 21100000-21164000 Deferred mss32
PE 22300000-2232b000 Deferred msseax.m3d
PE 22400000-22419000 Deferred msssoft.m3d
PE 24100000-24121000 Deferred mssdsp.flt
PE 26f00000-26f2c000 Deferred mssmp3.asi
PE 40001000-401b7000 Stabs libwine.1.0.dylib
TrinityCore rev. 4164d8998069 2017-03-12 14:19:51 +0100 (4.3.4 branch) (Unix, Release, Static) (worldserver-daemon)
<Ctrl-C> to stop.
______ __
/\__ _\ __ __/\ \__
\/_/\ \/ _ __ /\_\ ___ /\_\ \, _\ __ __
\ \ \/\`'__\/\ \ /' _ `\/\ \ \ \/ /\ \/\ \
\ \ \ \ \/ \ \ \/\ \/\ \ \ \ \ \_\ \ \_\ \
\ \_\ \_\ \ \_\ \_\ \_\ \_\ \__\\/`____ \
\/_/\/_/ \/_/\/_/\/_/\/_/\/__/ `/___/> \
TrinityCore rev. 4164d8998069 2017-03-12 14:19:51 +0100 (4.3.4 branch) (Unix, Release, Static) (worldserver-daemon)
<Ctrl-C> to stop.
______ __
/\__ _\ __ __/\ \__
\/_/\ \/ _ __ /\_\ ___ /\_\ \, _\ __ __
\ \ \/\`'__\/\ \ /' _ `\/\ \ \ \/ /\ \/\ \
\ \ \ \ \/ \ \ \/\ \/\ \ \ \ \ \_\ \ \_\ \
\ \_\ \_\ \ \_\ \_\ \_\ \_\ \__\\/`____ \
\/_/\/_/ \/_/\/_/\/_/\/_/\/__/ `/___/> \