Skip to content

Instantly share code, notes, and snippets.

View sheepla's full-sized avatar
🐑
メェ〜

sheepla sheepla

🐑
メェ〜
View GitHub Profile
@repeatedly
repeatedly / d_master.md
Last active June 8, 2023 06:20
D言語基礎文法最速マスター

他の言語をある程度知っている人はこれを読めばD言語の基礎をマスターでき,D言語の氷山の一角くらいは知ることができると思います.対象バージョンはdmd 2.059です.

1. 基礎

ソースファイル

ASCIIかUTFしか受け付けません.それ以外の文字コードで書くとコンパイルエラーになります.

main

D言語のmainはCとは違い以下のようなシグネチャです.

@mattn
mattn / .classpath
Created August 8, 2012 04:51
業務プログラマがFizzBuzz書いたらどうなるか ( ref: http://d.hatena.ne.jp/irof/20120808/p1 )
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/usr/share/java/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="/usr/share/java/junit4.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
@davewilson
davewilson / Play-Mario.ps1
Last active March 17, 2024 15:35
Super Mario Theme in PowerShell
Function Play-Mario {
[System.Console]::Beep(659, 125);
[System.Console]::Beep(659, 125);
[System.Threading.Thread]::Sleep(125);
[System.Console]::Beep(659, 125);
[System.Threading.Thread]::Sleep(167);
[System.Console]::Beep(523, 125);
[System.Console]::Beep(659, 125);
[System.Threading.Thread]::Sleep(125);
[System.Console]::Beep(784, 125);
@voluntas
voluntas / ocaml.rst
Last active December 31, 2023 05:11
OCaml コトハジメ

OCaml コトハジメ

日時:2016-11-06
作:@voluntas
バージョン:0.0.0
URL:https://voluntas.githu.io/

突っ込みは Twitter @voluntas まで。

@YusukeHosonuma
YusukeHosonuma / string_format.rs
Last active August 19, 2023 08:03
Rust: Format string. (println!)
use std::fmt;
struct Point {
x: i32,
y: i32,
}
impl fmt::Display for Point {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "({}, {})", self.x, self.y)
@greymd
greymd / ping_nyan.sh
Last active June 11, 2022 23:36
通常のpingで「にゃーん」を表示するシェル芸
#!/bin/bash
# From: https://twitter.com/grethlen/status/906154326975905793
sudo ping -i 0 -c 1400 pong4.kooshin.net \
| grep -oP "icmp_seq=\K\d+" \
| cat - <(seq 1 1400) \
| sort -n \
| uniq -c \
| awk '{printf $1}' \
| fold -w70 \
@gornostal
gornostal / README.md
Last active June 23, 2024 00:24
Ulauncher Color Themes

This will be a temporary site for sharing Ulauncher color themes

When posting a theme make sure it has

  • title (theme name or whatever)
  • link to a gist or github repo with theme files
  • screenshot attached (just drag an image onto a comment area)

@crgimenes
crgimenes / stringToReaderCloser.go
Last active April 11, 2024 15:41
string to io.ReadCloser
package main
import (
"bytes"
"fmt"
"io"
"os"
"strings"
)
@cnu
cnu / download.go
Created December 2, 2018 19:23
Download files in Go
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {