Skip to content

Instantly share code, notes, and snippets.

View slimsag's full-sized avatar
😸
Herding cats

Stephen Gutekanst slimsag

😸
Herding cats
View GitHub Profile
@slimsag
slimsag / gist:a7e1de60844656ec6a65
Created April 6, 2015 21:46
Appdash + Martini workaround
// webapp: a standalone example Negroni / Gorilla based webapp.
//
// This example demonstrates basic usage of Appdash in a Negroni / Gorilla
// based web application. The entire application is ran locally (i.e. on the
// same server) -- even the Appdash web UI.
package main
import (
"fmt"
"log"
I wrote this code:
```
/// # Examples
///
/// ```
/// extern crate num;
/// use self::num::Float;
/// use fiz_math::Vec2;
///
// match
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
match (self.x.partial_cmp(&other.x), self.y.partial_cmp(&other.y), self.z.partial_cmp(&other.z), self.w.partial_cmp(&other.w)) {
(Some(Ordering::Less), Some(Ordering::Less), Some(Ordering::Less), Some(Ordering::Less)) => Some(Ordering::Less),
(Some(Ordering::Greater), Some(Ordering::Greater), Some(Ordering::Greater), Some(Ordering::Greater)) => Some(Ordering::Greater),
(Some(Ordering::Equal), Some(Ordering::Equal), Some(Ordering::Equal), Some(Ordering::Equal)) => Some(Ordering::Equal),
_ => None
}
}
extern crate num;
// Must re-export num for the unit! macro.
#[doc(hidden)]pub use num as num_export;
mod vec2;
mod vec3;
mod vec4;
mod float;
mod clamp;

Error:

$ cargo test
   Compiling fiz-math v0.0.12 (file:///home/stephen/Desktop/rust/mycrate)
src/lib.rs:4:13: 4:23 error: source trait is inaccessible
src/lib.rs:4     let v = x.to_foo().0;
                         ^~~~~~~~~~
src/lib.rs:4:13: 4:23 note: module `foo` is private
src/lib.rs:4 let v = x.to_foo().0;
// NewRouter returns a new router instance.
func NewRouter() *Router {
return &Router{namedRoutes: make(map[string]*Route), KeepContext: false}
}

Option 2: Provision a new cluster locally using Docker for Mac

  1. Enable / install Docker for Mac's Kubernetes support via Docker > Preferences > Kubernetes:

image

  1. Ensure Docker has lots of memory (e.g. 8GB).

  2. Delete all resources and limits references in our repository. Otherwise all pods will fail to start due to hitting the resource requests. Unless you have something like a 90 core 300GB RAM dev laptop, I don't know of a better way to do this.

WebSocket connection to TypeScript backend at wss://typescript.sourcegraph.com opened
extension.ts:133 Initializing TypeScript backend...
extension.ts:104 1:41:40 PM TypeScript backend [conn 609b2510-fcc4-11e8-ad49-c36481de55ad] Trace initialize https://app.lightstep.com/cbb1e22b27954f252b7ec9e394363309/trace?span_guid=4bf2ce4d0421f9f2&at_micros=1544478099984279
extension.ts:104 1:41:40 PM TypeScript backend [conn 609b2510-fcc4-11e8-ad49-c36481de55ad] rootUri https://sourcegraph.com/github.com/sourcegraph/sourcegraph@REDACTED/-/raw/
extension.ts:104 1:41:40 PM TypeScript backend [conn 609b2510-fcc4-11e8-ad49-c36481de55ad] Fetching archive from https://sourcegraph.com/github.com/sourcegraph/sourcegraph@REDACTED/-/raw/
extension.ts:104 1:41:40 PM TypeScript backend [conn 609b2510-fcc4-11e8-ad49-c36481de55ad] Extracting to /home/node/cache/lang-typescript-7cdd8b84ff-bxnhw/609b2510-fcc4-11e8-ad49-c36481de55ad/repo
extension.ts:104 1:41:41 PM TypeScript backend [conn 609b2510-fcc4-11e8-ad49-c36481de55ad] package.j
// +build ignore
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
@slimsag
slimsag / gist:2ee0626de234df0731d6923200a4f45b
Last active February 19, 2019 00:00
Painted Heart - Jane Zhang

Painted Heart - Jane Zhang

1)---0:28-0:35--------------------------  | - | 2)---0:35-0:42-------------------------
  ●●● ○○○ | ●●● ○○○ | ●●○ ○○○ | ●●○ ○○○   | - |   ●●● ●●○ | ●●● ○○○ | ●●○ ○○○ | ●●○ ○○○
  ○●● ○○○ | ●○○ ○○○ | ●●○ ○○○ | ●●● ○○○   | - |   ○●● ○○○ | ●○○ ○○○ | ●●● ○○○ | ○●● ○○●
  ●●● ●●● | ●●● ●●○                       | - |   ○●● ●●● | ●●● ●●○
  --------------------------------------  | - |   -------------------------------------