Skip to content

Instantly share code, notes, and snippets.

@0xhanh
0xhanh / DeviceDataRepository.java
Created April 22, 2020 07:08 — forked from brunnels/DeviceDataRepository.java
Generic REST Query Language with RSQL for Spring Data JPA
package org.kraven.repository;
import org.kraven.domain.DeviceData;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
/**
* Spring Data JPA repository for the DeviceData entity.
*/
@SuppressWarnings("unused")
public interface DeviceDataRepository extends JpaRepository<DeviceData,Long>, JpaSpecificationExecutor<DeviceData> {
@0xhanh
0xhanh / nginx.conf
Created February 20, 2020 06:06 — forked from CSRaghunandan/nginx.conf
nginx conf for rtmp hls
#user nobody;
worker_processes 4;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;

I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools

@0xhanh
0xhanh / faiss_install_notes_on_high_sierra.md
Created May 20, 2019 17:13 — forked from maxime/faiss_install_notes_on_high_sierra.md
Install Facebook FAISS on macOS High Sierra

Those instructions are working for me as of January 2017, 2018. Using Homebrew and maOS 10.13.2

Install xCode command line tools (if you don't have it already)

xcode-select --install

Install LLVM

@0xhanh
0xhanh / attributes-demo.js
Created April 26, 2019 09:31 — forked from ashvayka/attributes-demo.js
Thingsboard Attributes API demo application
// Requires node.js and mqtt library installed.
var mqtt = require('mqtt');
var os = require("os");
const thingsboardHost = "demo.thingsboard.io";
// Reads the access token from arguments
const accessToken = process.argv[2];
// Default topics. See http://thingsboard.io/docs/reference/mqtt-api/ for more details.
const attributesTopic = 'v1/devices/me/attributes';
@0xhanh
0xhanh / insthdfprep.sh
Created April 13, 2019 06:18 — forked from asears/insthdfprep.sh
Install Hortonworks Data Flow - Preparation
#!/bin/bash
# Download repos
wget -nv https://s3.amazonaws.com/public-repo-1.hortonworks.com/HDF/centos7/3.x/updates/3.0.2.0/hdf.repo -O /etc/yum.repos.d/hdf.repo
wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.0.0/ambari.repo -O /etc/yum.repos.d/ambari.repo
wget -nv http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.3.0/hdp.repo -O /etc/yum.repos.d/hdp.repo
yum repolist
# Download management pack and unzipwget -nv https://s3.amazonaws.com/public-repo-1.hortonworks.com/HDF/centos7/3.x/updates/3.0.2.0/tars/hdf_ambari_mp/hdf-ambari-mpack-3.0.2.0-76.tar.gz ~/hdf-ambari-mpack-3.0.2.0-76.tar.gz
cd ~
tar -xvf hdf-ambari-mpack-3.0.2.0-76.tar.gz
@0xhanh
0xhanh / .bash_profile
Created May 11, 2018 15:20 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management