Skip to content

Instantly share code, notes, and snippets.

@lyuehh
lyuehh / guacamole install on ubuntu 18.04.sh
Last active February 1, 2019 05:35 — forked from thimslugga/guacamole install on ubuntu 16.04
guacamole install on ubuntu 18.04
# install required packages
apt -y update
add-apt-repository ppa:webupd8team/java
apt -y update
apt -y install libcairo2-dev libjpeg-turbo8-dev libpng-dev libossp-uuid-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev \
libvncserver-dev libpulse-dev libssl-dev libvorbis-dev libwebp-dev git build-essential autoconf libtool oracle-java8-installer tomcat8 \
tomcat8-admin tomcat8-common tomcat8-docs tomcat8-user maven postgresql-server-dev-9.5 postgresql-common postgresql-9.5 libpulse-dev \
libvorbis-dev freerdp ghostscript wget pwgen
# create directories & files
{"sig":"0baadc092f4c9c14f392581117daa8d87feaa6e457b09d9759f15c2a38af69553c82f678b4dc679ba99b3c4e8f5985c536a42d4c0ad6b020b299ecb967976dfa0","msghash":"f64ca939ace3a5c2c4d41162d2973b023e6ead80568fa7d0e266abe122b1b4f6"}
@lyuehh
lyuehh / designer.html
Last active August 29, 2015 14:14
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../notification-elements/notification-alert.html">
<link rel="import" href="../ace-element/ace-element.html">
<link rel="import" href="../paper-button/paper-button.html">
FROM centos:centos6
RUN cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN yum install -y gcc-c++ which wget tar gcc zlib zlib-devel openssl openssl-devel unzip mysql-devel python-devel
RUN mkdir /opt/logs
RUN mkdir /usr/src/nodejs
WORKDIR /usr/src/nodejs
ENV LANG en_US.UTF-8

Keybase proof

I hereby claim:

  • I am lyuehh on github.
  • I am lyuehh (https://keybase.io/lyuehh) on keybase.
  • I have a public key whose fingerprint is 8A78 802F 2D0B 6415 51A8 9CE9 93D8 144A 12B1 801E

To claim this, I am signing this object:

{
"jtree": [
{
"text": "全公司",
"expanded": true,
"attr": {
"path": "cop.all",
"tag": [
],
function ngEnter() {
return function (scope, element, attrs) {
element.bind("keydown keypress", function (event) {
if(event.which === 13) {
scope.$apply(function (){
scope.$eval(attrs.ngEnter);
});
event.preventDefault();
}
});
(function () {
'use strict';
var queryString = {};
queryString.parse = function (str) {
if (typeof str !== 'string') {
return {};
}
str = str.trim().replace(/^(\?|#)/, '');
function debouncer(func, timeout) {
var timeoutID;
timeout = timeout || 300;
return function () {
var scope = this , args = arguments;
clearTimeout( timeoutID );
timeoutID = setTimeout( function () {
func.apply( scope , Array.prototype.slice.call( args ) );
}, timeout);
};
@lyuehh
lyuehh / util.js
Created September 11, 2014 02:01
getParameterByName, readablizeBytes, formatSize
function getParameterByName(name, search) {
var match = RegExp('[?&]' + name + '=([^&]*)')
.exec(search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}
function readablizeBytes(size) {
if (size <= 100000){
return '' + size;
}