Skip to content

Instantly share code, notes, and snippets.

View xenophy's full-sized avatar

Xenophy.CO.,LTD xenophy

View GitHub Profile
@xenophy
xenophy / aliases.json
Created January 23, 2016 19:52
Class Aliases in Ext JS 6.0.2
{
widget: {
loadmask: 'Ext.LoadMask',
button: 'Ext.button.Button',
cycle: 'Ext.button.Cycle',
splitbutton: 'Ext.button.Split',
buttongroup: 'Ext.container.ButtonGroup',
viewport: 'Ext.container.Viewport',
flash: 'Ext.flash.Component',
checkboxgroup: 'Ext.form.CheckboxGroup',
_und.each(this.collection, function (postmanRequest) {
var found = postmanRequest.name.match(/(\[loop=\d+\])/i);
if (found) {
found = found[0].substr(6, found[0].length - 7);
found = Number(found);
for(var i=0; i<found; i++) {
RequestRunner.addRequest(postmanRequest);
@xenophy
xenophy / FileExists.vba
Created December 9, 2015 14:51
FileExists in Excel for mac 2016 VBA
Function FileExists(ByVal AFileName As String) As Boolean
On Error GoTo Catch
strFile = Dir(AFileName, MacID("TEXT"))
FileExists = True
GoTo Finally
Catch:
@xenophy
xenophy / StringFromClass.swift
Last active September 19, 2015 23:50
Create dynamic class instance from String in Swift 2.0
// 実行アプリ名前空間取得
let namespace = NSStringFromClass(self.dynamicType).componentsSeparatedByString(".")[0]
// 生成クラス名取得
let clsName = namespace + ".MyViewController"
// ViewController生成
var cls:UIViewController.Type = NSClassFromString(clsName) as! UIViewController.Type
var vc:UIViewController = (cls.init() as UIViewController)
@xenophy
xenophy / EXTJS16164.js
Created January 25, 2015 14:17
EXTJS-16164 Patch in Ext JS 5.1.0
// http://www.sencha.com/forum/showthread.php?296296
Ext.define('Ext.patch.EXTJS16164', {
// {{{ override
override: 'Ext.selection.CheckboxModel',
// }}}
// {{{ compatibility
Ext.define('MyApp.overrides.util.Observable', {
override: 'Ext.util.Observable',
requires: [
'Ext.mixin.Observable'
],
statics: {
capture: function(o, fn, scope) {
Ext.mixin.Observable.capture(o, fn, scope);
},
releaseCapture: function(o) {
@xenophy
xenophy / gist:d37badeeea7b0a1a7b09
Created November 24, 2014 15:48
run "ksdiff" using left and right directory path on VimFiler
" It's just write following code to your .vimrc.
" Last line specified keybind to "F8".
function! Extcute_ksdiff() "{{{
let current_nr = winnr()
let bufnr = 1
let leftwin = ""
let rightwin = ""
while bufnr <= winnr('$')
if getwinvar(bufnr, '&filetype') ==# 'vimfiler'
function(path) {
var paths = path.split('.'),
current = window,
i, len;
len = paths.length;
for (i = 0; i < len; ++i) {
if (current[paths[i]] == undefined) {
return undefined;
@xenophy
xenophy / gist:6977939
Created October 14, 2013 15:59
文字列のExt Direct関数を関数オブジェクトに変換する方法
var me = this,
p = me.getEditView(),
form = p.getForm(),
fn = p.api.remove;
if (typeof fn !== 'function') {
//<debug>
var fnName = fn;
//</debug>
Ext.define('MyApp.form.Panel', {
extend: 'Ext.form.Panel',
initComponent: function() {
var me = this;
// スーパークラスメソッドコール
me.callParent(arguments);