Install NFS.
Add to /etc/exports
:
<export_path> <network>/24(rw,nohide,insecure,no_subtree_check,sync,all_squash,anonuid=1000,anongid=1000)
ActionController::Base.new.read_fragment('key') | |
ActionController::Base.new.expire_fragment('key') |
class Target | |
class_attribute :index_mappings | |
class << self | |
def mappings(*args, &block) | |
self.index_mappings ||= { options: {}, mappings: {} } | |
mappings = nil | |
options = nil |
require "benchmark/ips" | |
state1 = :initial | |
state2 = "initial" | |
Benchmark.ips do |x| | |
x.report("<Symbol> => (<String>, <Symbol>)") do | |
case state1 | |
when "initial", :initial | |
a = 1 |
$ curl 127.0.0.1:9200 | |
{ | |
"status" : 200, | |
"name" : "Stonewall", | |
"version" : { | |
"number" : "1.3.4", | |
"build_hash" : "a70f3ccb52200f8f2c87e9c370c6597448eb3e45", | |
"build_timestamp" : "2014-09-30T09:07:17Z", | |
"build_snapshot" : false, | |
"lucene_version" : "4.9" |
# Based on chruby's auto feature | |
# https://github.com/postmodern/chruby/blob/bfd78880fbbbf13635e1f97f83225c6a03ca6e89/share/chruby/auto.sh | |
function gvm_auto() { | |
local dir="$PWD/" version | |
until [[ -z "$dir" ]]; do | |
dir="${dir%/*}" | |
if { read -r version <"$dir/.go-version"; } 2>/dev/null || [[ -n "$version" ]]; then |
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
# Sends a bunch of links to delicious. | |
# | |
# This script depends on pydelicious library, which can be found here: | |
# http://code.google.com/p/pydelicious/ | |
# | |
# Command-line usage: | |
# | |
# delicious_send.py <username> <password> <file with links> [file2, file3, ... ] |
From 9a41f1f8b7ce073302e864cd71901c0628d818be Mon Sep 17 00:00:00 2001 | |
From: Kiyoshi de Brito Murata <13k@kside.net> | |
Date: Mon, 9 Feb 2009 05:03:32 -0200 | |
Subject: [PATCH] Horizontal size and alignment | |
--- | |
data/guake.schemas | 32 +++++- | |
data/prefs.glade | 274 ++++++++++++++++++++++++++++++++-------------- | |
src/guake.py | 92 +++++++++++----- | |
src/guake_globals.py.in | 3 + |
class Array | |
def slices(*args) | |
args.map do |arg| | |
case arg | |
when Range, Fixnum | |
self[arg] | |
else | |
raise ArgumentError, "Arguments for slices() must be either Fixnum or Range" | |
end | |
end |
#!/bin/sh | |
# Pushes current branch to remote branch possibly with different names | |
# With no arguments, pushes to origin +<branch>:<branch> where <branch> | |
# is the same branch name as current. | |
# With one argument, pushes to origin +<branch>:<argument> | |
head=`git symbolic-ref HEAD` | |
branch=`basename $head` | |
git push origin +$branch:${1:-$branch} |