Skip to content

Instantly share code, notes, and snippets.

@juniorh
juniorh / gist:a24c20868cdb21f4a1ab6eda1b9d3965
Last active January 25, 2018 11:28
tunneling rdp connection through ssh
[mypc] <--> [ssh server: example.com] <--> [rdp server windows: win.dest.com]
ssh -L 3389:win.dst.com:3389 example.com -p 22
ssh -L 3389:192.168.202.3:3389 -l rizal 6efd062ed0d8.sn.mynetname.net -p 65422
then connect rdp server via localhost port 3389
FROM debianbase:7.11
MAINTAINER Rizal Muhammad Nur
# bypass interactive when install percona
RUN echo "percona-xtradb-cluster-server-5.5 percona-xtradb-cluster-server/root_password password unused" | debconf-set-selections
RUN echo "percona-xtradb-cluster-server-5.5 percona-xtradb-cluster-server/root_password_again password unused"| debconf-set-selections
# install percona
RUN apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
RUN echo "deb http://repo.percona.com/apt wheezy main" | tee -a /etc/apt/sources.list.d/percona.list
RUN echo "deb-src http://repo.percona.com/apt wheezy main" | tee -a /etc/apt/sources.list.d/percona.list
@juniorh
juniorh / rutorrent.conf
Last active December 5, 2015 19:11
Nginx configuration for rutorrent
upstream backendrutorrent {
server unix:/var/run/php5-fpm.sock;
}
upstream backendrtorrent {
server 127.0.0.1:5000;
}
server{
listen 80;
location / {
return 301 https://$host$request_uri;
@juniorh
juniorh / s3curl.pl
Last active August 29, 2015 14:23
riak-cs_s3curl
#!/usr/bin/perl -w
# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this
# file except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
@juniorh
juniorh / influxdb.0.9.0-rc20.showdiagnostics.error.log
Created April 7, 2015 04:12
Influxdb 0.9.0-RC20 Crash after query SHOW DIAGNOSTICS
panic: unsupported statement type: *influxql.ShowDiagnosticsStatement
goroutine 4214 [running]:
github.com/influxdb/influxdb.func·039()
/root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/server.go:2121 +0x6b0
created by github.com/influxdb/influxdb.(*Server).ExecuteQuery
/root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/server.go:2143 +0x314
goroutine 1 [chan receive (nil chan)]:
main.execRun(0xc20800a010, 0x4, 0x4)
@juniorh
juniorh / db_influxdb.json
Created January 27, 2015 05:04
Influxdb plugin for sensu with key series
{
"influxdb": {
"host": "192.168.1.1",
"port": "8086",
"username": "sensu",
"password": "password",
"database": "sensu"
}
}
@juniorh
juniorh / db_influxdb.json
Last active August 29, 2015 14:14
Influxdb plugin for sensu
{
"influxdb": {
"host": "192.168.1.1",
"port": "8086",
"username": "sensu",
"password": "password",
"database": "sensu"
}
}
@juniorh
juniorh / influxdb-sensu.py
Last active August 29, 2015 14:14
Sensu Scripts
#!/usr/bin/env python
'''
Skrip ini memproses output dari proses cek dengan format
============
<deskirpsi1> <nilai1>
<deskirpsi2> <nilai2>
...
=============
Untuk menggunakan skrip ini, diperlukan konfiurasi pada server seperti berikut
{
@juniorh
juniorh / p1.md
Last active August 29, 2015 14:14
test_public_1

Testing