日時: | 2024-05-29 |
---|---|
作: | 時雨堂 |
バージョン: | 2024.1 |
URL: | https://sora-labo.shiguredo.jp/ |
概要
日時: | 2024-05-29 |
---|---|
作: | 時雨堂 |
バージョン: | 2024.1 |
URL: | https://sora-labo.shiguredo.jp/ |
概要
if (!String.prototype.repeat) { | |
// polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat | |
String.prototype.repeat = function(count) { | |
'use strict'; | |
if (this == null) { | |
throw new TypeError('can\'t convert ' + this + ' to object'); | |
} | |
var str = '' + this; | |
count = +count; | |
if (count != count) { |
# Description: | |
# DOCOMOの雑談APIを利用した雑談 | |
# | |
# Author: | |
# FromAtom | |
getTimeDiffAsMinutes = (old_msec) -> | |
now = new Date() | |
old = new Date(old_msec) | |
diff_msec = now.getTime() - old.getTime() |
package main | |
import ( | |
"bytes" | |
"log" | |
"net/smtp" | |
) | |
func main() { | |
// Connect to the remote SMTP server. |
package main | |
import ( | |
"log" | |
"net" | |
"os" | |
"os/signal" | |
"sync" | |
"syscall" | |
"time" |
################################################################## | |
# /etc/elasticsearch/elasticsearch.yml | |
# | |
# Base configuration for a write heavy cluster | |
# | |
# Cluster / Node Basics | |
cluster.name: logng | |
# Node can have abritrary attributes we can use for routing |
$ time curl -Lso - http://bit.ly/ye8vZA | zcat | ruby -rtext -e 'w=ARGF.read.split(/\n/);p %w(インターネト プログラミングル 東強都 任人堂 東京特許許許可局 マロオブラザーズ イーサネッット コソトローラ).map{|i|w.sort_by{|j|Text::Levenshtein.distance(i,j)}[0]}' | |
["インターネット", "プログラミング", "東都", "任天堂", "東京特許許可局", "マリオブラザーズ", "イーサネット", "コントローラ"] | |
real 14m13.030s | |
user 13m28.858s | |
sys 0m5.232s |
Since you're using CentOS 5, the default package manager is yum
, not apt-get
. To install a program using it, you'd normally use the following command:
$ sudo yum install <packagename>
However, when trying to install git this way, you'll encounter the following error on CentOS 5:
cd ~ | |
sudo yum update | |
sudo yum install java-1.7.0-openjdk.i686 -y | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
mv elasticsearch-* elasticsearch | |
sudo mv elasticsearch /usr/local/share |