Skip to content

Instantly share code, notes, and snippets.

View duyet's full-sized avatar

duyet duyet

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[[local|localrc]]
# Modify to your environment
#FIXED_RANGE=10.0.0.0/24
#FLOATING_RANGE=192.168.1.224/27
#PUBLIC_NETWORK_GATEWAY=192.168.1.225
#PUBLIC_INTERFACE=em1
#PHYSICAL_NETWORK=public
#OVS_PHYSICAL_BRIDGE=br-ex
#HOST_IP=104.199.204.70
@duyet
duyet / local.conf
Created October 29, 2016 10:47
Devstack config for Magnum and Maruno
[[local|localrc]]
# Modify to your environment
#FIXED_RANGE=10.0.0.0/24
#FLOATING_RANGE=192.168.1.224/27
#PUBLIC_NETWORK_GATEWAY=192.168.1.225
#PUBLIC_INTERFACE=em1
#PHYSICAL_NETWORK=public
#OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_INTERFACE=eth0
@duyet
duyet / duyetdev-spark-to-parquet.scala
Created September 21, 2016 03:35
Spark convert CSV to Parquet.
def convert(sqlContext: SQLContext, filename: String, schema: StructType, tablename: String) {
// import text-based table first into a data frame.
// make sure to use com.databricks:spark-csv version 1.3+
// which has consistent treatment of empty strings as nulls.
val df = sqlContext.read
.format("com.databricks.spark.csv")
.schema(schema)
.option("delimiter","|")
.option("nullValue","")
.option("treatEmptyValuesAsNulls","true")
@duyet
duyet / blog-webpack-2.md
Created May 16, 2016 02:06 — forked from xjamundx/blog-webpack-2.md
From Require.js to Webpack - Part 2 (the how)

This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.

In that post I talked about 3 main reasons for moving from require.js to webpack:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.

@duyet
duyet / dropbox
Last active March 12, 2016 17:39 — forked from lmammino/dropbox
Run dropbox CLI as service
#/etc/init.d/dropbox
start() {
echo "Starting dropbox..."
start-stop-daemon -b -o -c dropbox -S -x /dropbox/.dropbox-dist/dropboxd
}
stop() {
echo "Stopping dropbox..."
start-stop-daemon -o -c dropbox -K -x /dropbox/.dropbox-dist/dropboxd

Các hồ sơ cần thiết khi tiến hành thanh lý tài sản cố định hữu hình

  1. Lập hội đồng xác định giá tài sản cố định
  2. Quyết định thanh lý tài sản cố định
  3. Biên bản kiểm kê tài sản cố định [mẫu]
  4. Biên bản đánh giá lại tài sản cố định [mẫu]
  5. Hợp đồng kinh tế bán tài sản cố định được thanh lý
  6. Biên bản giao nhận tài sản cố định [mẫu]
  7. Biên bản hủy tài sản cố định
  8. Thanh lý hợp đồng kinh tế bán tài sản cố định
$( "#result" ).load( "ajax/test.html", function() {
alert( "Load was performed." );
});
// ----------------
function show_me (message) {
console.log(message);
}
  1. Install python3, pip, posgres, virtualenv
sudo apt-get install python3 python3-dev python-pip 
sudo apt-get install libpq-dev libjpeg-dev build-essential python-dev # fix
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
sudo apt-get install apache2 libapache2-mod-wsgi-py3
sudo apt-get install postgresql postgresql-contrib
sudo pip install virtualenv