Skip to content

Instantly share code, notes, and snippets.

View mitsuruog's full-sized avatar
🏄‍♂️
Surfing

Mitsuru Ogawa mitsuruog

🏄‍♂️
Surfing
View GitHub Profile
@mitsuruog
mitsuruog / err.md
Created February 17, 2014 09:18
npm ERR! Error: forbidden user: mitsuruog not authorized to modify generator-sapui5
mitsuruog:generator-sapui5 mitsuruog$ npm publish
npm http PUT https://registry.npmjs.org/generator-sapui5
npm http 409 https://registry.npmjs.org/generator-sapui5
npm http GET https://registry.npmjs.org/generator-sapui5
npm http 200 https://registry.npmjs.org/generator-sapui5
npm http PUT https://registry.npmjs.org/generator-sapui5
npm http 403 https://registry.npmjs.org/generator-sapui5
npm http PUT https://registry.npmjs.org/generator-sapui5
npm http 403 https://registry.npmjs.org/generator-sapui5
@mitsuruog
mitsuruog / sapui5.html
Last active August 29, 2015 13:56
Hello SAPUI5
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="SAPUI5でHello world" />
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Hello SAPUI5</title>
<script id="sap-ui-bootstrap" type="text/javascript"
src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
@mitsuruog
mitsuruog / Gruntfile1.js
Last active August 29, 2015 13:57
CoffeeScriptのコンパイルタスク
coffee: {
compile: {
files: {
// 1:1 コンパイル
'path/to/result.js': 'path/to/source.coffee',
// コンパイルして1つのファイルに結合
'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee']
}
}
}
@mitsuruog
mitsuruog / setting.js
Created April 1, 2014 15:12
Fidder2 reverse proxy rule.
static function OnBeforeRequest(oSession: Session) {
// ...
//services.odata.orgへのリバースプロキシ設定
//
//localhostdで/Northwind/というコンテキストがある場合に
//services.odata.org:80ドメインへリクエストを投げます。
if (oSession.HostnameIs("localhost") && oSession.uriContains("/Northwind/")) {
oSession.host = "services.odata.org:80";
@mitsuruog
mitsuruog / proxy.py
Created May 19, 2014 01:00
SublimeText2のPackageControlがProxy環境下でインストールが出来ない場合のメモ
http://qiita.com/n_morioka/items/a7a52314aeb2ab86fa61
import urllib2,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler({'http': 'http://proxyアドレス:8080'})) ); by = urllib2.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
@mitsuruog
mitsuruog / settings.js
Created May 19, 2014 02:41
Fiddler2でのリバースプロキシ設定ルール例
if (oSession.HostnameIs("localhost") && oSession.uriContains("/odata/")) {
oSession.host = "10.100.100.100:8000";
oSession.PathAndQuery = oSession.PathAndQuery.replace("bank/", "");
}
button = new sap.m.Button
text: "Action!!"
press: [message: "Hello :)", (evt, param) ->
jQuery.sap.require "sap.m.MessageToast"
sap.m.MessageToast.show param.message
]
button.placeAt "content"
@mitsuruog
mitsuruog / 0_reuse_code.js
Created August 5, 2014 01:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@mitsuruog
mitsuruog / Locale.controller.coffee
Created August 10, 2014 15:04
[SAPUI5/OpenUI5]スマートに国際化する方法のBlogコードサンプル
sap.ui.controller "com.mitsuruog.sapui5.showroom.view.Locale",
onInit: ->
i18nModel = new sap.ui.model.resource.ResourceModel
bundleUrl : "i18n/messageBundle.properties"
@getView().setModel i18nModel, "i18n"