This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
jdbc_url='172.16.8.xxx:3306' | |
mysql_db='kafka_data' | |
mysql_user_name='kafka' | |
mysql_passwd='kafka' | |
mysql_tb='project' | |
hive_db='yijia' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
yum install -y wget | |
wget https://download.teamviewer.com/download/teamviewer.i686.rpm | |
yum install teamviewer.i686.rpm -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<cstring> | |
using namespace std; | |
class String { | |
public: | |
String(const char *str); | |
String(const String &other); | |
~String(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python 2.7 | |
'\\uxxxx'.decode('unicode-escape') | |
# python 3.x | |
'\\uxxxx'.encode('ascii').decode('unicode-escape') | |
'\\uxxxx'.decode('unicode-escape') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf8 | |
import time | |
import redis | |
from multiprocessing import Process | |
def pub(r, num_msg): | |
for i in range(num_msg): | |
r.publish('channel', 'offset %d' % i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf8 | |
import socket | |
import time | |
import multiprocessing | |
def socket_instance(): | |
c = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
c.connect(('127.0.0.1', 1024)) | |
return c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
PASSWD='helloworld1234' | |
yum update -y | |
yum install -y yum-utils device-mapper-persistent-data lvm2 | |
yum install docker-ce -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nu | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Maintainer: | |
" Amir Salihefendic | |
" http://amix.dk - amix@amix.dk | |
" | |
" Version: | |
" 6.0 - 01/04/17 14:24:34 | |
" | |
" Blog_post: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
OlderNewer