Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Deyong Zhu M2shad0w

🎯
Focusing
View GitHub Profile
View 升级npm 和node的shell 命令
sudo npm update npm -g
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
@M2shad0w
M2shad0w / gist:e225d20a051eff23dff3
Created Dec 28, 2015 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations
View gist:e225d20a051eff23dff3

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@M2shad0w
M2shad0w / txt
Created Jan 30, 2016
build_crosstools-ng_error
View txt
This file has been truncated, but you can view the full file.
[INFO ] Performing some trivial sanity checks
[DEBUG] Testing '! ( -n )'
[DEBUG] Testing '! ( -n )'
[DEBUG] Testing '! ( -n )'
[DEBUG] Testing '! ( -n )'
[DEBUG] Testing '! ( -n )'
[DEBUG] Testing '! ( -n )'
[DEBUG] ==> Executing: 'mkdir' '-p' '/Volumes/esp-open-sdk/esp-open-sdk/crosstool-NG/.build'
[DEBUG] ==> Executing: 'rm' '-f' '/Volumes/esp-open-sdk/esp-open-sdk/crosstool-NG/.build/backtrace'
@M2shad0w
M2shad0w / config.log
Created Feb 2, 2016
esp 8266 crosstool-ng config log
View config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GNU C Runtime Library configure 1.0, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ /Volumes/esp-open-sdk/esp-open-sdk/crosstool-NG/.build/src/gcc-4.8.2/libgcc/configure --cache-file=./config.cache --with-cross-host=x86_64-build_apple-darwin15.2.0 --prefix=/Volumes/esp-open-sdk/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools --with-local-prefix=/Volumes/esp-open-sdk/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot --with-sysroot=/Volumes/esp-open-sdk/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot --with-newlib --enable-threads=no --disable-shared --with-pkgversion=crosstool-NG 1.20.0 --disable-__cxa_atexit --with-isl=/Volumes/esp-open-sdk/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools --with-libelf=/Volumes/esp-open-sdk/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools --enable-lto --ena
View config_test_log.txt
Reading specs from /Volumes/esp-open-sdk/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-core-pass-2/./gcc/specs
COLLECT_GCC=/Volumes/esp-open-sdk/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-core-pass-2/./gcc/xgcc
Target: xtensa-lx106-elf
Configured with: /Volumes/esp-open-sdk/esp-open-sdk/crosstool-NG/.build/src/gcc-4.8.2/configure --build=x86_64-build_apple-darwin15.2.0 --host=x86_64-build_apple-darwin15.2.0 --target=xtensa-lx106-elf --prefix=/Volumes/esp-open-sdk/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools --with-local-prefix=/Volumes/esp-open-sdk/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot --disable-libmudflap --with-sysroot=/Volumes/esp-open-sdk/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot --with-newlib --enable-threads=no --disable-shared --with-pkgversion='crosstool-NG 1.20.0' --disable-__cxa_atexit --with-gmp=/Volumes/esp-open-sdk/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools --with-mpfr=/Volumes/esp-open-sdk/es
View spark_package$TreeNodeException: execute
Caused by: org.apache.spark.sql.catalyst.errors.package$TreeNodeException: execute, tree:
TungstenExchange hashpartitioning(additional#3,200), None
+- TungstenAggregate(key=[additional#3], functions=[(count(additional#3),mode=Partial,isDistinct=false)], output=[additional#3,count#81L])
+- Project [additional#3]
+- Filter (((created_at#0 >= 2016-01-25) && (created_at#0 < 2016-01-26)) && (action#2 = search))
+- InMemoryColumnarTableScan [additional#3,created_at#0,action#2], [(created_at#0 >= 2016-01-25),(created_at#0 < 2016-01-26),(action#2 = search)], InMemoryRelation [created_at#0,eventable_type#1,action#2,additional#3,track_id#4,device#5,city_code#6], true, 10000, StorageLevel(true, true, false, true, 1), ConvertToUnsafe, Some(tracklogs)
at org.apache.spark.sql.catalyst.errors.package$.attachTree(package.scala:49)
@M2shad0w
M2shad0w / zeppelin-emr-bootstrap-action.sh
Created May 27, 2016 — forked from snowindy/zeppelin-emr-bootstrap-action.sh
This is bootstrap action script for Amazon EMR helping installing Apache Zeppelin to work with Apache Spark. Works fine with [EMR Release label:emr-4.0.0 Hadoop distribution:Amazon 2.6.0 Applications:Hive 1.0.0, Spark 1.4.1]
View zeppelin-emr-bootstrap-action.sh
#!/bin/bash
#Zeppelin installation on Spark EMR cluster
sudo yum update -y
sudo yum install -y git
# Installing maven: https://gist.github.com/sebsto/19b99f1fa1f32cae5d00
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
@M2shad0w
M2shad0w / build.sbt
Created Jul 9, 2016 — forked from mumoshu/build.sbt
DES and AES encryption in Scala
View build.sbt
name := "DES and AES encryption in Scala"
version := "1.0"
scalaVersion := "2.9.1"
libraryDependencies += "commons-codec" % "commons-codec" % "1.6"
@M2shad0w
M2shad0w / flume-tail-log
Created Jul 21, 2016
flume数据传输到Avro sink
View flume-tail-log
# Define source, channel, sink
agent1.sources = r1
agent1.channels = ch2
agent1.sinks = avro-sink1
# Configure channel
agent1.channels.ch2.type = file
agent1.channels.ch2.capacity = 1000000
agent1.channels.ch2.transactionCapacity = 500000
View test_pyspark.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.