Skip to content

Instantly share code, notes, and snippets.

@Globegitter
Globegitter / es.sh
Last active November 18, 2020 12:52
Easy install for elasticsearch on Ubuntu 14.04
cd ~
##If you want to install OpenJDK
#sudo apt-get update
#sudo apt-get install openjdk-8-jre-headless -y
###Or if you want to install Oracle JDK, which seems to have slightly better performance
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
@oriSomething
oriSomething / some-component.js
Last active April 3, 2020 09:45
Reflux + React + ES7 decorators
import React, { Component } from 'react';
import storeDecorator from './store-decorator';
import someStore, { SOME_STORE_SYMBOL } from './some-reflux-store';
@storeDecorator(someStore)
class SomeComponent extends Component {
render() {
return (
<div>
{this.state[SOME_STORE_SYMBOL].someProperty}
#
# .bazelrc has --test_tag_filters=-integration
# so integration tagged tests are skipped by default
#
echo ">> 🧐 Running Isolated Tests 🧐 <<"
START_TIME=$SECONDS
./bazel test \
//...
ELAPSED_TIME_MS_TEST=$(((SECONDS - START_TIME)*1000))
@rsff
rsff / ssh_agent_start.fish
Last active March 14, 2019 08:56 — forked from schaary/ssh_agent_start.fish
ssh agent for fish
#this script can never fail
#i use it in the fish_config
#call it with start_agent
setenv SSH_ENV $HOME/.ssh/environment
function start_agent
if [ -n "$SSH_AGENT_PID" ]
ps -ef | grep $SSH_AGENT_PID | grep ssh-agent > /dev/null
load("@io_bazel_rules_go//go:def.bzl", "go_path")
load("@io_bazel_rules_go//go/private:providers.bzl", "GoLibrary", "GoPath")
_MOCKGEN_TOOL = "@com_github_golang_mock//mockgen"
def _gomock_sh_impl(ctx):
go_toolchain = ctx.toolchains["@io_bazel_rules_go//go:toolchain"]
gopath = "$(pwd)/" + ctx.var["BINDIR"] + "/" + ctx.attr.gopath_dep[GoPath].gopath
load("//packages/bazel/rules_common:defs.bzl",
"module_mappings_runtime_aspect",
"collect_node_modules_aspect",
"sources_aspect",
"test_sources_aspect",
"short_path_to_manifest_path",
"get_ci")
load("//packages/bazel/rules_nodejs/internal/node:node.bzl", "nodejs_binary_impl",
"NODE_EXECUTABLE_OUTPUTS", "BASE_NODE_EXECUTABLE_ATTRS", "NODE_TOOLCHAINS")
load(":providers.bzl", "TypeScriptModuleInfo")
def _test_sources_aspect_impl(target, ctx):
result = depset()
if hasattr(ctx.rule.attr, "tags") and "NODE_MODULE_MARKER" in ctx.rule.attr.tags:
return struct(node_test_sources=result)
if hasattr(ctx.rule.attr, "deps"):
const jest = require('jest-cli');
const fs = require('fs-extra');
const nodePath = require('path');
const outputDir = process.env.TEST_UNDECLARED_OUTPUTS_DIR;
const cwd = process.cwd();
const getSnapshotPath = (testResult) => {
const filePath = nodePath.relative(cwd, testResult.testFilePath);
@denolfe
denolfe / Remove-alt-tab-animation-from-elementary-os-freya.md
Last active September 19, 2017 13:21
Remove Alt-Tab animation from Elementary OS Freya

Remove Alt-Tab animation from Elementary OS Freya

Install custom build of Gala

sudo apt-get install bzr 

bzr branch lp:~gala-dev/gala/no-depth-alt-tab

sudo apt-get build-dep gala 
@mikermcneil
mikermcneil / outcome-oriented-programming.md
Last active July 13, 2017 14:34
Outcome Oriented Programming - Software as a plan

Outcome-Oriented Programming

Mike McNeil, Aug 2014

Humans are not very good at planning. We have no problem running scenarios, thinking through possibilities, and pondering "what if?" questions. I might plan to not eat my cousin's birthday cake before she gets home, for instance. If I'm very serious, I might write down my commitment; or if I'm unsure about the pros and cons, use some organizational tool like a T-chart.

But when it comes to making a decision in the moment, all bets are off. The cake is a goner.

Predictive Analysis vs. Process Design

Below, I've included a figure containing a decision tree diagram.