Skip to content

Instantly share code, notes, and snippets.

View dmiyakawa's full-sized avatar
🤠
Vacation in Raccoon City

Daisuke Miyakawa dmiyakawa

🤠
Vacation in Raccoon City
View GitHub Profile
@dmiyakawa
dmiyakawa / gist:5590428
Created May 16, 2013 09:05
hello_world's Makefile in pepper_25
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# GNU Make based build file. For details on GNU Make see:
# http://www.gnu.org/software/make/manual/make.html
#
#
@dmiyakawa
dmiyakawa / gist:5590436
Created May 16, 2013 09:06
hello_world's Makefile in pepper_26
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# GNU Make based build file. For details on GNU Make see:
# http://www.gnu.org/software/make/manual/make.html
#
#
dn: cn=samba,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: samba
olcAttributeTypes: {0}( 1.3.6.1.4.1.7165.2.1.4 NAME 'acctFlags' DESC 'Account
Flags' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{16} S
INGLE-VALUE )
olcAttributeTypes: {1}( 1.3.6.1.4.1.7165.2.1.3 NAME 'pwdLastSet' DESC 'NT pwdL
astSet' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VAL
UE )
olcAttributeTypes: {2}( 1.3.6.1.4.1.7165.2.1.5 NAME 'logonTime' DESC 'NT logon
dn: cn=apple_auxillary,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: apple_auxillary
olcAttributeTypes: {0}( 1.2.840.113556.1.4.867 NAME 'altSecurityIdentities' EQ
UALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.14
66.115.121.1.15 )
olcAttributeTypes: {1}( 1.2.840.113556.1.4.771 NAME 'servicePrincipalName' EQU
ALITY caseExactMatch SUBSTR caseExactSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.
115.121.1.15 )
dn: cn=apple,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: apple
olcAttributeTypes: {0}( 1.3.6.1.4.1.250.1.60 NAME 'ttl' EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
olcAttributeTypes: {1}( 1.3.6.1.4.1.63.1000.1.1.1.1.6 NAME 'apple-user-homeurl
' DESC 'home directory URL' EQUALITY caseExactIA5Match SUBSTR caseExactIA5Sub
stringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
olcAttributeTypes: {2}( 1.3.6.1.4.1.63.1000.1.1.1.1.7 NAME 'apple-user-class'
DESC 'user class' EQUALITY caseExactIA5Match SUBSTR caseExactIA5SubstringsMat
FFmpeg Howto
Table of Contents
* Generic Syntax
* Main Options
* Encoding :
@dmiyakawa
dmiyakawa / gist:8a427c0b1d1c37b6161c
Last active August 29, 2015 14:03
shortでおかしなことが起きるプログラム

先日の講義でプログラムと型の話がありました。

一部の方には、実際に何が問題になり得るかを口頭で説明しましたが、念の為実際に問題になる実例を示します。 なお、本文の内容は授業上必須ではないはずですので、お暇な方だけ、どうぞ。

ここでは来週説明する予定であるifとforが出ていますので、今は雰囲気だけ感じてください。

#forについてはp121、ifについてはp128に、それぞれ説明があります。

一時期話題になった、FizzBuzzというプログラムを例に挙げてみます。

@dmiyakawa
dmiyakawa / gist:79eb95ab91527fe1939d
Created July 25, 2014 07:08
自分がよく知らないRubyの挙動
#!/usr/bin/ruby
class Test
def initialize
end
def test
f = Proc.new {|item| puts item}
f.call("hello1")
f("hello2")
@dmiyakawa
dmiyakawa / adder
Created November 6, 2014 08:00
adder server
# -*- coding: utf-8 -*-
import webapp2
import logging
class MainPage(webapp2.RequestHandler):
def get(self):
addr = self.request.remote_addr
try:
lst = self.request.get_all('q')
@dmiyakawa
dmiyakawa / rdec
Created January 23, 2015 12:17
A script communicating with YK-KSM
!/bin/bash
host='localhost'
verbose=1
request_decrypt() {
otp=$1
qw_str=$(echo $otp | tr "axje.uidchtnmbrl'poygk,qf;" 'abcdefghijklmnopqrstuvwxyz')
url="http://${host}/wsapi/decrypt?otp=${qw_str}"
test $verbose -eq 1 && echo "url: ${url}"