Skip to content

Instantly share code, notes, and snippets.

@howie
howie / install-yard.sh
Last active September 10, 2023 10:06
Install YARD dotfile
#!/bin/bash
set -e
#
# Install YARD dotfile
#
#
sh -c "`curl -fsSL https://raw.githubusercontent.com/skwp/dotfiles/master/install.sh`"
@howie
howie / gist:440b9f5436a9e9bbd125be09fdbc7b03
Last active May 8, 2018 06:53
spark CodeGenerator error
/* 001 */ public Object generate(Object[] references) {
/* 002 */ return new GeneratedIteratorForCodegenStage2(references);
/* 003 */ }
/* 004 */
/* 005 */ final class GeneratedIteratorForCodegenStage2 extends org.apache.spark.sql.execution.BufferedRowIterator {
/* 006 */ private Object[] references;
/* 007 */ private scala.collection.Iterator[] inputs;
/* 008 */ private org.apache.spark.sql.execution.joins.UnsafeHashedRelation bhj_relation;
/* 009 */ private boolean locallimit_stopEarly;
/* 010 */ private int locallimit_count;
Java 內建的 ( https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html )
// "\\p{Space}" A whitespace character
// "\\p{Punct}" A punctuation character
-------------Unicode Range--------------------
// "\u0080-\u00FF" Latin-1 Supplement https://www.compart.com/en/unicode/block/U+0080
// "\u2000-\u206F" GeneralPunctuation https://www.compart.com/en/unicode/block/U+2000
// "\u2190-\u21FF" Arrows https://www.compart.com/en/unicode/block/U+2190
// "\u2200-\u22FF" MathematicalOperators https://www.compart.com/en/unicode/block/U+2200
04887a724e22786456041ce632e067f21c253779330c4c5d2ffd7ea6ea4e42e6bae18d094f53ade476c371cd54d799302857674cb6b0d68a78d0ea2bb353ecc801;c-darwin
- name: Ubuntu - update
apt: state=latest name='*'
when: apt_update is defined
- name: Ubuntu - Install htop
apt: name=htop state=latest
- name: Ubuntu - Install vim
apt: name=vim state=latest
@howie
howie / Format JSON.py
Last active August 29, 2015 14:26 — forked from edenwaith/Format JSON.py
TextWrangler Text Filter to Format JSON
#!/usr/bin/python
import fileinput
import json
if __name__ == "__main__":
text = ''
for line in fileinput.input():
text = text + ' ' + line.strip()
jsonObj = json.loads(text)
print json.dumps(jsonObj, sort_keys=False, indent=2)
# Referecne: http://linoxide.com/linux-shell-script/shell-script-check-linux-system-health/
#!/bin/bash
EMAIL=''
function sysstat {
echo -e "
#####################################################################
Health Check Report (CPU,Process,Disk Usage, Memory)
#####################################################################
#!/bin/bash
set -e
#Referecne:
# 1. https://gist.github.com/zenorocha/7159780
# 2. https://gist.github.com/agnoster/3712874
# 3. https://github.com/digitalformula/zsh.prompts
# Shared functions

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark