(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
package pony; | |
import graphql.language.*; | |
import java.util.List; | |
public class GraphQLPrinter { | |
private int indentWidth = 4; |
2015-01-28 15:33:30 dimadima anyone here edit java with vim? | |
2015-01-28 15:33:37 surial dimadima: only complete blithering idiots. | |
2015-01-28 15:33:45 dimadima hmm | |
2015-01-28 15:33:56 surial vim is a great editor, but it's not intelligent, and java is a language that is extremely suitable to intelligent editing. | |
2015-01-28 15:34:04 surial In fact, you could go so far as to say that you NEED it to keep your sanity. | |
2015-01-28 15:34:06 dimadima i edit java with vim and i'm enjoying it well enough so far | |
2015-01-28 15:34:14 dimadima my one problem is that syntax highlighting | |
2015-01-28 15:34:17 freeone3000 Java IDEs are intelligent so Java developers don't have to be. | |
2015-01-28 15:34:27 freeone3000 dimadima: That's the one thing vim *does* do for Java code. | |
2015-01-28 15:34:27 surial dimadima: have you _used_ an intelligent editor? |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>project</groupId> | |
<artifactId>streams</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>streams</name> |
# Observations about binary and binary operations: | |
* Bitshifting by 1 either adds or subtracts a multiple of 2 from each factor of 2. | |
** Take, for example, the number 10 (decimal) | |
** 10 = 8 + 2 = 1*(2^3) + 0*(2^2) + 1*(2^1) + 0*(2^0), or 1010 in binary. | |
** If you shift each of these bits to the left by 1, you get 10100. | |
** This took each of the 1 bits (multiples of 2) in the binary representation and multplied each by 2: | |
*** 10100 is 1*(2^4) + 0*(2^3) + 1*(2^2) + 0*(2^1) + 0*(2^0) = 16 + 0 + 4 + 0 + 0 = 20. | |
*** Notice that 20 = 16 + 4 = 2*8 + 2*2 = 2*(8 + 2). |
# MAC manipulators | |
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`' | |
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE' |
from django.db import models | |
from django.utils.decorators import wraps | |
from django.core.exceptions import ValidationError | |
def constraint(func): | |
@wraps(func) | |
def inner(*args, **kwargs): | |
func._is_constraint = True | |
return func(*args, **kwargs) | |
return inner |
#!/bin/bash | |
HOST=172.17.42.1:9200 | |
create() { | |
curl -XPUT "$HOST"/test | |
#!/usr/bin/env bash | |
# From https://groups.google.com/forum/#!topic/coreos-dev/JAeABXnQzuE | |
pushd $(dirname $0) > /dev/null; CURRABSPATH=$(readlink -nf "$(pwd)"); popd > /dev/null; # Get the directory in which the script resides | |
set -x | |
MUSLPKG="musl:musl.tgz:http://www.musl-libc.org/releases/musl-1.1.4.tar.gz" | |
LEVTPKG="libevent:libevent2.tgz:https://cloud.github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz" | |
TMUXPKG="tmux:tmux.tgz:http://iweb.dl.sourceforge.net/project/tmux/tmux/tmux-1.9/tmux-1.9a.tar.gz" | |
NCRSPKG="ncurses:ncurses.tgz:http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz" |
var nsq = require('nsqjs'); | |
function populate(done) { | |
var w = new nsq.Writer('10.0.0.101', 4150); | |
w.connect(); |