Skip to content

Instantly share code, notes, and snippets.

View fire's full-sized avatar

K. S. Ernest (iFire) Lee fire

View GitHub Profile
@fire
fire / gist:c0fa189c55322e062a23
Last active March 7, 2018 21:38
Install Elementary Loki on ZFS root
# Experimental 2016-01-10
DOES NOT WORK YET.
sudo -i
apt-get update
apt-get install --yes debootstrap zfsutils-linux zfs-initramfs zfs-dkms
modprobe zfs
# setup zfs
@fire
fire / run_letsencrypt
Created February 3, 2016 21:42 — forked from lgg/run_letsencrypt
Let's encrypt auto authenticator runner for multiply domains
#!/bin/bash
#Vars
web_service='nginx'
config_path='/usr/local/letssl/'
le_path='/opt/letsencrypt'
exp_limit=20;
#Func
function check_ssl {
@fire
fire / simple_git.md
Created February 13, 2016 04:10 — forked from 17twenty/simple_git.md
A Simple Git branching model

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

The gist

@fire
fire / vklayer
Created February 20, 2016 00:41 — forked from cheery/vklayer
Run scripts with added vulkan layers
#!/usr/bin/env python
"""
Run programs with added vulkan layers.
Author: Henri Tuhola <[email protected]>
License: MIT
Date: 2016-2-20
"""
import argparse, json, os, sys
@fire
fire / .spacemacs
Last active February 25, 2016 08:40
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@fire
fire / gist:910665b7e52cfd594b5a
Last active April 20, 2021 21:50
Boxstarter
# http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/fire/910665b7e52cfd594b5a/raw/1d73b40e0f78843e0f5648c92240126314c201c5/gistfile1.txt
# See http://boxstarter.org/Learn/WebLauncher
Set-WindowsExplorerOptions -EnableShowFileExtensions
#Enable-RemoteDesktop
#cinst fiddler4
#cinst git-credential-winstore
#cinst console-devel
#cinst sublimetext2
#cinst poshgit
# Create virtual machine
# Delete nic
# Generate ip from ovh
headnode# sdc-napi /nics -X POST -d '{ "vlan_id": "VLAN-ID", "nic_tag": "NIC-TAG", "ip" :"IP-ADDRESS", "primary": false, "owner_uuid": "OWNER-UUID", "belongs_to_uuid": "VM-UUID", "network_uuid": "NETWORK-UUID", "belongs_to_type": "zone", "mac":"MAC-ADDRESS" }'
headnode# sdc-vmapi /vms/VM-UUID?action=add_nics -X POST -d '{"macs":"MAC-ADDRESS"}'
@fire
fire / create-smartos-vm.sh
Created March 20, 2016 07:19 — forked from twobitfool/create-smartos-vm.sh
Create a SmartOS VM in VirtualBox
#!/bin/sh
#
# Creates a SmartOS VM in VirtualBox (assuming you alread have VirtualBox installed)
#
# This script will:
# * Download the latest live ISO image of SmartOS
# * Create a VirtualBox VM, or update an existing VM with the latest ISO
# * Configure the VM with a zones disk, and boot it!
#
#
[1/1050] Building CXX object Source/ThirdParty/AngelScript/CMakeFiles/AngelScript.dir/source/as_bytecode.cpp.obj
[2/1050] Building CXX object Source/ThirdParty/AngelScript/CMakeFiles/AngelScript.dir/source/as_compiler.cpp.obj
[3/1050] Building C object Source/ThirdParty/SDL/CMakeFiles/SDL.dir/src/haptic/windows/SDL_windowshaptic.c.obj
[4/1050] Running utility command for STB
[5/1050] Building CXX object Source/ThirdParty/AngelScript/CMakeFiles/AngelScript.dir/source/as_callfunc_x86.cpp.obj
[6/1050] Building CXX object Source/ThirdParty/AngelScript/CMakeFiles/AngelScript.dir/source/as_module.cpp.obj
[7/1050] Building CXX object Source/ThirdParty/AngelScript/CMakeFiles/AngelScript.dir/source/as_configgroup.cpp.obj
[8/1050] Building CXX object Source/ThirdParty/AngelScript/CMakeFiles/AngelScript.dir/source/as_objecttype.cpp.obj
[9/1050] Building CXX object Source/ThirdParty/AngelScript/CMakeFiles/AngelScript.dir/source/as_callfunc_x64_mingw.cpp.obj
[10/1050] Building C object Source/ThirdParty/SDL/CMakeFiles/SDL
The scala program is erroring at:
messages.foreachRDD { rdd =>
val messageRdd = ssc.sparkContext.parallelize(Seq(Message.parseFrom(rdd._1)))
val hekaDF = ssc.snappyContext.protoToDF(messageRdd)
hekaDF.write.insertInto(tableName)
}
// https://github.com/trueaccord/sparksql-scalapb/blob/3469c7d5853024aa397f3b9c259ae6f682a97cfd/src/main/scala/com/trueaccord/scalapb/spark/ProtoSQL.scala
[2:44]