Skip to content

Instantly share code, notes, and snippets.

View boyxgc's full-sized avatar

Guocheng Xie boyxgc

  • San Francisco, CA, United States
View GitHub Profile
@nickbabcock
nickbabcock / DropRawApplication.java
Last active March 8, 2019 06:50
Dropwizard Example using Raw Jetty
package com.example;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator;
import com.google.common.base.Strings;
import io.dropwizard.Application;
import io.dropwizard.setup.Environment;
import org.eclipse.jetty.servlet.ServletHolder;
import javax.servlet.ServletException;
@mwermuth
mwermuth / UIBezier+Arrow.swift
Created September 11, 2014 14:01
Drawing an Arrow with Swift
extension UIBezierPath {
class func getAxisAlignedArrowPoints(inout points: Array<CGPoint>, forLength: CGFloat, tailWidth: CGFloat, headWidth: CGFloat, headLength: CGFloat ) {
let tailLength = forLength - headLength
points.append(CGPointMake(0, tailWidth/2))
points.append(CGPointMake(tailLength, tailWidth/2))
points.append(CGPointMake(tailLength, headWidth/2))
points.append(CGPointMake(forLength, 0))
points.append(CGPointMake(tailLength, -headWidth/2))
@egaumer
egaumer / DSL Examples
Last active June 26, 2019 20:21
Some example queries using elastic.js
# simple match all query with term facet
ejs.Request()
.indices("myindex")
.types("mytype")
.query(ejs.MatchAllQuery())
.facet(
ejs.TermsFacet('url')
.field('url')
.size(20))

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: