Skip to content

Instantly share code, notes, and snippets.

View bithavoc's full-sized avatar

Johan Hernandez bithavoc

View GitHub Profile
@bithavoc
bithavoc / NSString+UnicodeString.mm
Created January 18, 2015 17:37
Convert NSString to icu::UnicodeString back and forth
//
// NSString+UnicodeString.m
//
// Created by Johan Hernandez on 1/18/15.
// Copyright (c) 2015 Bithavoc.io - All rights reserved.
//
#import "NSString+UnicodeString.hh"
#include <string>
CREATE TABLE IF NOT EXISTS events (
id TEXT,
name TEXT,
time TIMESTAMP,
state TEXT,
context map<text, text>,
account TEXT,
email TEXT,
visitor TEXT,
device TEXT,
// http://github.com/ride/go-migrate
type MigrationHandler func(context *migrate.Context) error
type core.Migration struct {
Up: MigrationHandler,
Down: MigrationHandler,
Name: "Something cool",
}
package main
import (
. "github.com/smartystreets/goconvey/convey"
"sync"
"testing"
)
var mutex sync.Mutex
#include <iostream>
#include <locale>
#include <regex>
using namespace std;
class Node {
public:
Node(const string& name) : name(name) {
cout << "grid " << this->name << " initialized" << endl;
//
// AppDelegate.m
// testNotifications
//
// Created by Johan Ride on 12/4/14.
// Copyright (c) 2014 Ride.com. All rights reserved.
//
#import "AppDelegate.h"
if defined?(ActiveSupport)
ActiveSupport.on_load(:action_controller) do
include AnalyticsHelper
end
end
Process: Google Chrome [22511]
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Identifier: com.google.Chrome
Version: 39.0.2171.71 (2171.71)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Google Chrome [22511]
User ID: 501
Date/Time: 2014-12-02 12:26:25.922 -0500
require 'minitest_helper'
require 'action_controller'
class ControllerStuff < ActionController::Base
def create
local_activity.action("yay!")
end
end
class ControllerStuffTest < ActionController::TestCase
@bithavoc
bithavoc / output.sh
Created November 17, 2014 16:31
capturing stack traces in go
/opt/boxen/homebrew/Cellar/go/1.3.3/libexec/src/pkg/runtime/proc.c:1445 runtime - goexit
/opt/boxen/homebrew/Cellar/go/1.3.3/libexec/src/pkg/runtime/proc.c:247 runtime - main
/Users/ride/src/going/src/github.com/ride/teste/main.go:67 main - main
/Users/ride/src/going/src/github.com/ride/teste/main.go:72 main - level1
/Users/ride/src/going/src/github.com/ride/teste/main.go:76 main - level2
/Users/ride/src/going/src/github.com/ride/teste/main.go:80 main - level3
/opt/boxen/homebrew/Cellar/go/1.3.3/libexec/src/pkg/runtime/panic.c:248 runtime - panic
Error recovered: shit went wrong