Skip to content

Instantly share code, notes, and snippets.

@gccmbr
gccmbr / README.md
Created November 21, 2015 15:14 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@gccmbr
gccmbr / postgres-cheatsheet.md
Created June 14, 2017 11:31 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

If run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gccmbr
gccmbr / csharpserver_dotnet_namedpipe.cs
Created December 4, 2017 13:51 — forked from abgoswam/csharpserver_dotnet_namedpipe.cs
C# Server using .NET Core Named Pipes
using System;
using System.IO;
using System.IO.Pipes;
using System.Text;
class PipeServerBinary
{
static void Main()
{
using (NamedPipeServerStream pipe = new NamedPipeServerStream("testpipe"))
@gccmbr
gccmbr / install_ambari_hdf.sh
Created December 24, 2017 02:27 — forked from abajwa-hw/install_ambari_hdf.sh
Install Ambari and HDF 2.0 mpack on RHEL7
#Based on http://docs.hortonworks.com/HDPDocuments/HDF2/HDF-2.0.0/bk_ambari-installation/content/index.html
export host_os=centos7
export ambari_version=2.4.1.0
export hdf_ambari_mpack_url="http://public-repo-1.hortonworks.com/HDF/${host_os}/3.x/updates/3.0.1.1/tars/hdf_ambari_mp/hdf-ambari-mpack-3.0.1.1-5.tar.gz"
export ambari_repo="http://public-repo-1.hortonworks.com/ambari/${host_os}/2.x/updates/${ambari_version}/ambari.repo"
#1. turn off firewall
systemctl stop firewalld.service
systemctl disable firewalld
@gccmbr
gccmbr / clean_hdp.sh
Created December 24, 2017 02:54
cleanup hdp
yum remove hive\*
yum remove oozie\*
yum remove pig\*
yum remove zookeeper\*
yum remove tez\*
yum remove hbase\*
yum remove ranger\*
yum remove knox\*
yum remove storm\*
yum remove accumulo\*
cd /opt
wget http://apache-mirror.rbc.ru/pub/apache/kafka/0.10.1.0/kafka_2.11-0.10.1.0.tgz
tar xvzf kafka_2.11-0.10.1.0.tgz
ln -s kafka_2.11-0.10.1.0/ kafka
vi /etc/systemd/system/kafka-zookeeper.service
[Unit]
Description=Apache Zookeeper server (Kafka)
Documentation=http://zookeeper.apache.org