Skip to content

Instantly share code, notes, and snippets.

View mikalv's full-sized avatar

Mikal mikalv

View GitHub Profile
@mikalv
mikalv / kernel-debug-kit-10.10.4-build-14E46
Created August 5, 2016 07:09 — forked from zchee/kernel-debug-kit-10.10.4-build-14E46
Kernel Debug Kit 10.10.4 build 14E46
OS X Yosemite Kernel Debug Kit Read Me
Please Note: After installation, the Kernel Debug Kit will be available at:
/Library/Developer/KDKs/
———————————————————————————————
The kernel file location has changed.
The kernel file location has moved to /System/Library/Kernels/kernel
DEVELOPMENT and DEBUG kernels
The OS X Yosemite Kernel Debug Kit includes the DEVELOPMENT and DEBUG kernel builds. These both have additional assertions and error checking compared to the RELEASE kernel. The DEVELOPMENT kernel can be used for every-day use and has minimal performance overhead, while the DEBUG kernel has much more error checking.

Keybase proof

I hereby claim:

  • I am mikalv on github.
  • I am meeh (https://keybase.io/meeh) on keybase.
  • I have a public key ASD-1mNJ6fo9VjMezaArNaEqvzALPwx1SbeCZ5R0IanaUwo

To claim this, I am signing this object:

@mikalv
mikalv / gcmcss.js
Created November 7, 2016 16:06 — forked from jamesvnz/gcmcss.js
Sample node.js server code to implement an XMPP server that will integrate with Android's Google Cloud Messaging (GCM) "device to cloud" message functionality - CCS. This sample only receives upstream messages (i.e. from the device).
var xmpp = require('node-xmpp');
//Set node-xmpp options.
//Replace with your projectID in the jid and your API key in the password
//The key settings for CCS are the last two to force SSL and Plain SASL auth.
var options = {
type: 'client',
jid: 'XXXXXXXXX@gcm.googleapis.com',
password: 'XXXXXXXX',
port: 5235,
@mikalv
mikalv / setup.md
Created November 11, 2016 20:08 — forked from xrstf/setup.md
Nutch 2.3 + ElasticSearch 1.4 + HBase 0.94 Setup

Info

This guide sets up a non-clustered Nutch crawler, which stores its data via HBase. We will not learn how to setup Hadoop et al., but just the bare minimum to crawl and index websites on a single machine.

Terms

  • Nutch - the crawler (fetches and parses websites)
  • HBase - filesystem storage for Nutch (Hadoop component, basically)
@mikalv
mikalv / README
Last active November 15, 2016 16:17 — forked from rwest/README
Convert OS X Keychain exported entries into logins for 1Password import
These two files should help you to import passwords from mac OS X keychains to 1password.
Assumptions:
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they
Using cron to perform incremental Map-Reduce in MongoDB
@mikalv
mikalv / min-char-rnn.py
Created November 18, 2016 19:36 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@mikalv
mikalv / gist:e23c924980a30aa7825fab91f4aa693b
Last active November 18, 2016 20:52 — forked from nherment/gist:1431054
MapReduce with MongoDB in NodeJS
var doMapReduce = function(options, callback) {
var map = function () {
var dateKey = new Date(options.time.getTime());
dateKey.setMinutes(0);
dateKey.setSeconds(0);
dateKey.setMilliseconds(0);
var mapped = {
@mikalv
mikalv / install-tensorflow.sh
Last active November 21, 2016 01:57 — forked from erikbern/install-tensorflow.sh
Installing TensorFlow on EC2
# Note – this is not a bash script (some of the steps require reboot)
# I named it .sh just so Github does correct syntax highlighting.
#
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5
#
# The CUDA part is mostly based on this excellent blog post:
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/
# Install various packages
sudo apt-get update
@mikalv
mikalv / gist:21f4a4c32f2869535ca9fcdeef129d53
Created November 21, 2016 11:56 — forked from jessitron/gist:8376139
scala: print all URLs on classpath
def urlses(cl: ClassLoader): Array[java.net.URL] = cl match {
case null => Array()
case u: java.net.URLClassLoader => u.getURLs() ++ urlses(cl.getParent)
case _ => urlses(cl.getParent)
}
val urls = urlses(getClass.getClassLoader)
println(urls.filterNot(_.toString.contains("ivy")).mkString("\n")