Skip to content

Instantly share code, notes, and snippets.

View opaopa6969's full-sized avatar

opaopa6969 opaopa6969

View GitHub Profile
@kmizu
kmizu / gist:1876800
Last active December 22, 2019 00:05 — forked from gakuzzzz/gist:1865400
Scala環境構築

Scala 開発環境構築手順

前提条件

  • JDKがinstall済みであること
  • java コマンドに環境変数Pathが通っていること
@stormcat24
stormcat24 / gist:2566998
Created May 1, 2012 10:09
eclipseのHTMLファイルで文字コード宣言をしないとShift-JISになってしまう問題の解決方法
plugins/org.eclipse.wst.html.core_1.1.502.v201202091936.jar のplugin.xmlファイルを修正する。
org.eclipse.core.contenttype.contentTypes部分を以下のように修正。le-extensionsからhtml, htmとかを除外する。
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type
file-extensions="htpl,wml"
priority="high"
name="%HTML_Content_Type_Extension_Element.name"
id="org.eclipse.wst.html.core.htmlsource"
base-type="org.eclipse.core.runtime.text">
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
@leifg
leifg / Vagrantfile
Last active August 15, 2024 15:13
Add a second disk to system using vagrant
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
@rrosiek
rrosiek / install_mysql.sh
Last active February 28, 2025 18:55
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Tested with Ubuntu 16.04.
#! /usr/bin/env bash
###
#
# install_mysql.sh
#
# This script assumes your Vagrantfile has been configured to map the root of
# your application to /vagrant and that your web root is the "public" folder
# (Laravel standard). Standard and error output is sent to
# /vagrant/vm_build.log during provisioning.
import java.util.Random;
import sun.misc.Unsafe;
import sun.nio.ch.DirectBuffer;
import java.lang.reflect.Field;
import java.nio.ByteBuffer;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@gakuzzzz
gakuzzzz / 1_.md
Last active March 7, 2025 06:35
Scala の省略ルール早覚え

Scala の省略ルール早覚え

このルールさえ押さえておけば、読んでいるコードが省略記法を使っていてもほぼ読めるようになります。

メソッド定義

def concatAsString(a: Int, b: Int): String = {
  val a_ = a.toString();
  val b_ = b.toString();
@sonots
sonots / fluentd_hacking_guide.md
Last active October 4, 2024 00:01
Fluentd ソースコード完全解説 (v0.10向け)

Fluentd ソースコード完全解説

英題:Fluentd Hacking Guide

目次

30分しかないため斜線部分は今回省く

  • Fluentd の起動シーケンスとプラグインの読み込み
  • Fluentd の設定ファイルのパース
  • Input Plugin から Output Plugin にデータが渡る流れ
digraph G {
{
JavaScriptがわかる [shape=diamond]
型がほしい [shape=diamond]
"Flash/ActionScript3が青春だった" [shape=diamond]
DeNAに勤めている [shape=diamond]
"Ruby or Pythonが好き" [shape=diamond]
クラスはほしい [shape=diamond]
JavaScriptの文法に不満がある [shape=diamond]
関数型わかる [shape=diamond]