Skip to content

Instantly share code, notes, and snippets.

View aiya000's full-sized avatar
🐶
Inu

aiya000 aiya000

🐶
Inu
View GitHub Profile
@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();
@funnythingz
funnythingz / ts-with-jquery-for-beginners.md
Last active July 20, 2016 04:11
TypeScript with jQuery 入門

TypeScript with jQuery 入門

TypeScript with jQueryをつかった入門です。とりあえずやってみましょう。

準備

プロジェクトテンプレートをもってくる。あるいはForkする。

% git clone https://github.com/funnythingz/typescript-jquery-template.git
@tanakh
tanakh / gist:8750952
Created February 1, 2014 11:20
なぜ我々はHaskellを使うのか

スタートアップ企業 Silk が、Haskellを採用した理由。

http://engineering.silk.co/post/31920990633/why-we-use-haskell

As a newly started company, we have a lot of technical decisions to make. One of the important ones is the choice of a programming language. Since we’re building a web application, this goes for both the client (i.e. the web browser) and the server.

新しく始めた会社として、我々はたくさんの技術的決定を行わなければなりません。中でも重要なのは、プログラミング言語の選択です。我々はウェブアプリケーションを作っていたので、この選択がクライアント(Webブラウザなど)とサーバの両方で必要になります。

On the client, there wasn’t much discussion. Javascript is the only viable choice, unless you want to use Flash or similar plugin-based models. But on the server, we had more freedom. Popular choices for web applications are dynamically typed languages like Ruby, Python and PHP, and statically typed languages like Java and C#.

@kikairoya
kikairoya / open-vm-tools_PKGBUILD
Created January 18, 2014 23:48
AURのopen-vm-tools-dkmsが最近のkernelで動かなくなってるからUbuntuからパチってきた
# patch -p1 <$srcdir/dkms-conf.patch
# $Id: PKGBUILD 102331 2013-12-09 03:38:37Z bisson $
# Maintainer: Sergej Pupykin <[email protected]>
# Contributor: Krzysztof Raczkowski <[email protected]>
pkgbase=open-vm-tools
pkgname=('open-vm-tools' 'open-vm-tools-dkms')
epoch=6
pkgver=9.4.0
_pkgsubver=1280544
@doi-t
doi-t / setting_default_value.bash
Last active April 2, 2023 11:35
シェル変数のデフォルト値を設定する
#!/bin/bash
foo=${1:-hoge}
echo $foo #$1がなかったらhogeをデフォルト値としてfooに代入する
#var自身にデフォルト値としてhogeを代入としたいので以下のように書きたい
${var:=hoge} #このままでは、hogeが展開されてしまって、hogeなんてコマンドはないとシェル怒られる
echo "1:$var"
var=
@riywo
riywo / reference.md
Last active May 12, 2021 05:37
gdbとかassemblyのアンチョコ

2進数

  • 0xXX
    • 1 byte = 16進数2桁 = 8 bit
  • 0xXXXXXXXX
    • 4 byte = 16進数8桁 = 32 bit
    • int
  • 0xYYYYYYYYXXXXXXXX
    • 8 byte = 16進数16桁 = 64 bit
    • long int
@gnarf
gnarf / ..git-pr.md
Last active January 27, 2025 01:56
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@bitterfox
bitterfox / Java8.java
Created March 13, 2013 04:54
Java8の言語仕様総まとめ LambdaとTypeAnnotationで変更される言語仕様を網羅しようとしてみました。 これ忘れてるよというのがありましたら教えてください。
import java.io.Serializable;
import java.lang.annotation.*;
public class Java8
{
@FunctionalInterface
private interface F // 関数型インターフェース
{
static F concat(F f1, F f2) // staticインターフェースメソッド
@rummelonp
rummelonp / zsh_completion.md
Last active February 22, 2023 15:06
zsh の補完関数の自作導入編

zsh の補完関数の自作導入編

あまり深く理解してないので識者のツッコミ大歓迎

補完を有効にする

取り敢えず最低限だけ

# 補完を有効にする