This is a Chinese version of https://gist.github.com/1207002/86f48cd3b3b72c85e6293926cf7c730de03b2f08 from lucasfais
⌘T | 前往文件 |
⌘⌃P | 前往项目 |
⌘R | 前往 method |
⌘⇧P | 命令提示 |
一个终端(记为A): | |
# [07/06 19:16:15] xenon@ribosome ~ $ | |
touch delete-me | |
# [07/06 19:16:22] xenon@ribosome ~ $ | |
vim delete-me | |
写进去一行字,作为内容。 | |
另一个终端(记为B)打开文件: |
# Flask related imports | |
from flask import Flask, render_template, jsonify, abort, request, make_response, session, redirect, url_for | |
# Flask extensions | |
from flask.ext.mongoengine import MongoEngine | |
from flask_debugtoolbar import DebugToolbarExtension | |
# Flask blueprints | |
import companies | |
from companies.views import companies |
import org.apache.spark.sql.Row | |
import org.apache.spark.sql.expressions.{MutableAggregationBuffer, UserDefinedAggregateFunction} | |
import org.apache.spark.sql.types.{ArrayType, LongType, DataType, StructType, StructField} | |
class CollectionFunction(private val limit: Int) extends UserDefinedAggregateFunction { | |
def inputSchema: StructType = | |
StructType(StructField("value", LongType, false) :: Nil) | |
def bufferSchema: StructType = | |
StructType(StructField("list", ArrayType(LongType, true), true) :: Nil) |
import com.google.common.collect.Lists; | |
import org.apache.flink.api.common.io.RichOutputFormat; | |
import org.apache.flink.configuration.Configuration; | |
import org.apache.hadoop.hbase.TableName; | |
import org.apache.hadoop.hbase.client.Connection; | |
import org.apache.hadoop.hbase.client.ConnectionFactory; | |
import org.apache.hadoop.hbase.client.Put; | |
import org.apache.hadoop.hbase.client.Table; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
Mac os 打印驱动 for linux | |
很多打印机只提供Mac os 打印驱动, 因为linux和Mac os 都使用的是标准的Unix 通用打印系统,所以提取Mac OS下的驱动ppd文件即可在linux使用打印机了。这里只是记录了一个方法,为了方便大家使用,我正在寻找一个网络空间可以将我提取出来的这些ppd驱动文件上传上去提供大家下载,可能还会提供一个便于检索的网页,如果大家有需要什么打印驱动的话,可以在这个gist后面留言。 | |
当然,我也会积极的将这些文件进行打包,然后丢到各大软件源中。以方便大家的使用。 | |
真心希望,linux这样好用的系统能快速发展,普及,能让更多的人感受到使用linux的快乐。 | |
苹果系统 Mac OS 打印驱动用在linux系统。(通过cups 通用Unix打印系统ppd格式化文件驱动打印机) |
This is a Chinese version of https://gist.github.com/1207002/86f48cd3b3b72c85e6293926cf7c730de03b2f08 from lucasfais
⌘T | 前往文件 |
⌘⌃P | 前往项目 |
⌘R | 前往 method |
⌘⇧P | 命令提示 |
worker_processes 2; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
} |
import java.net.URLDecoder | |
def parseUrlParameters(url: String) = { | |
url.split("&").map( v => { | |
val m = v.split("=", 2).map(s => URLDecoder.decode(s, "UTF-8")) | |
m(0) -> m(1) | |
}).toMap | |
} |
#!/usr/bin/env python | |
# | |
# Copyright 2012 by Jeff Laughlin Consulting LLC | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
All these Gist files are explained on my Open API Specification (fka Swagger Specification) tutorial on API Handyman blog.
This tutorial is composed of several posts, here are the posts links and files used for each one: