Skip to content

Instantly share code, notes, and snippets.

View masahide's full-sized avatar

YAMASAKI Masahide masahide

View GitHub Profile
#!/usr/bin/perl
use strict;
use warnings;
use IO::Socket::INET;
use Getopt::Long;
my $port = 7003;
my $host = '127.0.0.1';
my $timeout = 10;
@dahnielson
dahnielson / UUID.php
Last active April 15, 2026 06:57
Pure PHP UUID generator
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
@vmihailenco
vmihailenco / proxy.go
Created November 20, 2011 15:22
Simple TCP proxy in Golang
package main
import (
"bytes"
"encoding/hex"
"flag"
"fmt"
"io"
"log"
"net"
@kylelemons
kylelemons / piping.go
Last active May 31, 2024 09:07 — forked from dagoof/piping.go
piping exec.Cmd in golang (example sorts all regular files under a directory by their extension)
package main
import (
"bytes"
"exec"
"log"
"os"
)
// Pipeline strings together the given exec.Cmd commands in a similar fashion
@Gab-km
Gab-km / github-flow.ja.md
Last active June 22, 2026 09:04 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@hnakamur
hnakamur / ansible-directories.yml
Created August 19, 2013 05:21
First add localhost to your inventory file (ex. /etc/ansible/hosts or ~/.ansible/hosts) and then run ansible-playbook ansible-directories.yml
- hosts: localhost
connection: local
vars:
role: common
tasks:
- name: create directories for ansible files.
file: path={{ item }} state=directory
with_items:
- group_vars
- host_vars
@shirou
shirou / site.yml
Created August 19, 2013 08:46
Ansible-awx site.yml
---
# This playbook deploys the AWX application (database, web and worker) to a
# single server.
- hosts: all
tasks:
- name: group hosts by distribution
group_by: key="{{ ansible_distribution }}-{{ ansible_distribution_version }}"
- hosts: RHEL-6*:CentOS-6*:SL-6*
@voluntas
voluntas / shiguredo_tech.rst
Last active January 18, 2026 10:56
時雨堂を支える技術

時雨堂を支える技術

日時:2025-05-13
作:時雨堂
バージョン:2025.3
URL:https://shiguredo.jp/

言語

@shirou
shirou / ssh_keyscan.yml
Last active March 6, 2025 06:47
run ssh-keyscan to add keys to known_hosts. This is a playbook for ansible
---
- hosts: all
gather_facts: no
sudo: no
tasks:
- name: run ssh-keyscan to add keys to known_hosts
local_action: shell ssh-keyscan {{ ansible_ssh_host }} >> ~/.ssh/known_hosts
@benbjohnson
benbjohnson / gist:8338908
Created January 9, 2014 18:03
Cross Compile w/ drone.io
# This is what I have so far. The Go 1.2 installation doesn't seem to be correct so it's still breaking.
rm -rf /usr/local/go/src/pkg/appengine
rm -rf /usr/local/go/src/pkg/appengine_internal
rm /usr/local/go/src/pkg/os/error_posix.go
wget -O golang-crosscompile-master.zip https://github.com/davecheney/golang-crosscompile/archive/master.zip
unzip golang-crosscompile-master.zip
source golang-crosscompile-master/crosscompile.bash
go-crosscompile-build darwin/amd64