Skip to content

Instantly share code, notes, and snippets.

@tyage
tyage / get.js
Last active December 30, 2015 11:39
Array.prototype.uniq = function() {
var o = {}
, i
, l = this.length
, r = [];
for (i = 0; i < l; i += 1) o[this[i]] = this[i];
for (i in o) r.push(o[i]);
return r;
@tyage
tyage / mkmf.log
Created December 14, 2013 13:17
/Library/Ruby/Gems/2.0.0/gems/glib2-2.0.2/ext/glib2/mkmf.log
try_compiler_option: checking for -Wall option to compiler... -------------------- yes
"xcrun clang -o conftest -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin13 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L. -L/usr/local/lib -lruby.2.0.0 -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
@tyage
tyage / yuyusshiki.js
Created December 17, 2013 13:51
this is mod for Secure Shell(Google Chrome Extension).
var xhr = new XMLHttpRequest();
var url = 'https://gist.github.com/tyage/7823731/raw/b1ff47d4444f68fe76b3e91423648bb4d58eb564/yuyulist';
xhr.open('GET', url, true);
xhr.onloadend = function onReady() {
if (xhr.readyState != XMLHttpRequest.DONE || xhr.status != 200)
return;
var images = this.responseText.split("\n");
var screen = document.querySelector("#terminal>iframe").contentDocument.querySelector("x-screen");
screen.style.setProperty('background-size', '100%', '!important');
% find /Applications/Xcode.app -name "*gcc*"
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/libgcc_s.1.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/usr/lib/gcc
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/curl/typecheck-gcc.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/libgcc_s.1.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/libgcc_s.10.4.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/libgcc_s.10.5.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/curl/typecheck-gcc.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SD
@tyage
tyage / test.c
Last active January 1, 2016 00:39
% llvm-gcc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/ test.c
ld: warning: ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/libSystem.dylib, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/libSystem.dylib (3 slices)ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/crt1.o, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/crt1.o (5 slices)
ld: dynamic main executables must link with libSystem.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@tyage
tyage / web400.js
Last active January 4, 2016 13:29
seccon quals seccon競馬 writeup
var socket = io.connect('http://133.242.52.129');
for(p in socket_routes){
socket.on(p, (function(p) {
return function(message){
console.log(message.data && 'waku:' + message.data.id, message.data && 'rank:' + message.data.seq)
};
})(p));
}
@tyage
tyage / SHOPS
Last active January 4, 2016 15:59
phd4 quals oracle memo
USER_OBJECTSではこうなっていた
OBJECT_NAME, OBJECT_TYPE = (SHOPS, SYNONYM), (SHOP_PKG, PACKAGE), (SHOP_PKG, PACKAGE BODY)
id
- 1-5
zip_code
- 107061-107065
subway
(use srfi-1)
;;; PEGタームは,入力文字列と解析位置を与えると,解析結果を返す関数.
;;; 解析に成功すると(次の位置 . 意味値)のペアを,失敗すると#fを返す.
;;; 解析結果ペア
(define (make-result pos value) (cons pos value))
(define (position result) (car result))
(define (value result) (cdr result))
angularjs, emmet, less, php cs, sftp
@tyage
tyage / gist:9046728
Last active August 29, 2015 13:56
マシン構成整理しようと思い立った

理想

  • マシン1@家 (Raspberry Pi)
    • VPNサーバ
  • マシン2@家
    • Windowsサーバ
      • Wake on Lan
  • マシン3@家 (Debian)
    • 録画サーバー
  • Wake on Lan