Skip to content

Instantly share code, notes, and snippets.

@tsutsui
tsutsui / netbsd-luna68k-lcd.diff
Last active March 7, 2017 14:38
Porting LCD (on LUNA's front panel) driver for NetBSD/luna68k from OpenBSD/luna88k
Index: etc/etc.luna68k/MAKEDEV.conf
===================================================================
RCS file: /cvsroot/src/etc/etc.luna68k/MAKEDEV.conf,v
retrieving revision 1.8.10.2
diff -u -p -d -r1.8.10.2 MAKEDEV.conf
--- etc/etc.luna68k/MAKEDEV.conf 19 Feb 2017 07:42:37 -0000 1.8.10.2
+++ etc/etc.luna68k/MAKEDEV.conf 4 Mar 2017 18:10:18 -0000
@@ -4,7 +4,7 @@ all_md)
makedev ttya sd0 sd1 sd2 sd3 cd0 cd1 st0 st1
makedev wscons
# Mac側
docker run --privileged -d -p 9080:9080 --name centos_realm centos:6.8 /sbin/init
docker exec -it centos_realm /bin/bash
# Docker内
yum update -y && \
yum install -y wget curl && \
yum -y groupinstall base "Development tools" && \
iptables -A INPUT -p tcp -m tcp --dport 9080 -j ACCEPT && \
service iptables save && \
@mattsan
mattsan / orde08.rb
Last active November 9, 2016 14:48
オフラインリアルタイムどう書く E08 - 白黒陣取りゲーム
require './tester'
module Solver
def self.solve(input)
w, b = input.split(',')
whites = w.split(/\d{1,2}/).zip(w.split(/[a-s]/)[1..-1].map(&:to_i))
blacks = b.split(/\d{1,2}/).zip(b.split(/[a-s]/)[1..-1].map(&:to_i))
white_group = whites.group_by(&:first)
black_group = blacks.group_by(&:first)
@kakari2
kakari2 / 普通のSIer社員がやってること.md
Last active November 3, 2016 12:25
ソフトウェア開発ガイダンス 2015/01/27

普通のSIer社員がやってること

2015/1/27

#今日話すこと

  1. 自分のいる業界について
  2. ソフトウェア開発について
  • ソフトウェア工学
  • Microsoft界隈の最近の流れ
@caad1229
caad1229 / cmd_test.py
Created August 12, 2015 09:35
command module test python script
from cmd import Cmd
class testCmd(Cmd):
prompt = "hoge) "
def __init__(self):
Cmd.__init__(self)
def do_exe(self, arg):
print "do anything"
@kyanny
kyanny / Rakefile
Created July 29, 2015 16:58
Qiita::Team お引越しスクリプト
require 'json'
require 'yaml'
require 'nokogiri'
require 'uri'
require 'faraday'
require 'ostruct'
require 'pry'
def y data
puts YAML.dump data
@spiegel-im-spiegel
spiegel-im-spiegel / init.coffee
Last active October 27, 2020 06:03
ATOM Editor の設定(カスタマイズ, Windows 環境用)
################################################################
# miscellaneous functions
insertText = (str) ->
return unless editor = atom.workspace.getActiveTextEditor()
selection = editor.getLastSelection()
selection.insertText(str)
################################################################
# 現在日時を挿入するコマンドを追加
# refs https://github.com/dannyfritz/atom-date
@omidp
omidp / markdown
Created February 18, 2015 05:32
markdown
import java.io.FileOutputStream;
import java.io.StringReader;
import com.itextpdf.text.Document;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.html.simpleparser.HTMLWorker; // deprecated
import com.itextpdf.text.pdf.PdfWriter;
public class HtmlToPDF1 {
// itextpdf-5.4.1.jar http://sourceforge.net/projects/itext/files/iText/
import math
import random
#Counts how many times the user was wrong
#At 10 wrong letters the game ends
count = 0
#List of random words
rando = ["planet", "help", "smoke", "number", "right", "after", "quick", "brown", "jumped", " over"]
@cointoss1973
cointoss1973 / FizzBuzz.ps1
Created July 13, 2014 07:28
PowerShell で FizzBuzz
#
# FizzBuzz.ps1
#
Function Get-FizzBuzz($num)
{
$Fizz = $num % 3
$Buzz = $num % 5
if ($Fizz -eq 0 -and $Buzz -eq 0) {
return "Fizz Buzz"
} elseif ( $Fizz -eq 0) {