Skip to content

Instantly share code, notes, and snippets.

View mitchellsimoens's full-sized avatar

Mitchell Simoens mitchellsimoens

View GitHub Profile
@mitchellsimoens
mitchellsimoens / index.ts
Created October 1, 2019 20:58
Testing yargs for Gimbal
import * as yargs from 'yargs';
import './register';
const parser = yargs
.showHelpOnFail(false, 'Specify --help for available options')
.options({
'check-thresholds': {
boolean: true,
default: true,
@mitchellsimoens
mitchellsimoens / buildAST.js
Created February 1, 2019 13:53
buildAST.js
const { buildSchema, execute, parse } = require('graphql');
const idl = `
type Query {
version: String!
name: String!
}
extend type Query {
hello: String!
@mitchellsimoens
mitchellsimoens / index.js
Last active January 20, 2021 21:50
Workaround MaxItems not working for AWS Lambda listFunctions method
// https://github.com/aws/aws-sdk-js/issues/1118
const AWS = require('aws-sdk')
const instance = new AWS.Lambda()
function listFunctionsReally (lambda, params = {}) {
return new Promise((resolve, reject) => {
const req = lambda.listFunctions(params)
const results = []
const { MaxItems = 50 } = params

Keybase proof

I hereby claim:

  • I am mitchellsimoens on github.
  • I am mitchellsimoens (https://keybase.io/mitchellsimoens) on keybase.
  • I have a public key ASCBlXjUMzsk7CXAAGRjD1egdOP1WkdkKqJ9OiIF5B9Lxwo

To claim this, I am signing this object:

@mitchellsimoens
mitchellsimoens / Main.js
Created September 16, 2014 21:02
Move listeners to Main.js
{
xtype: 'wsCourseBrowser',
id: 'img-chooser-view',
region: 'center',
reference: 'courseBrowser',
listeners: {
selectionchange: 'onIconSelect',
itemdblclick: 'fireImageSelected'
}
},
@mitchellsimoens
mitchellsimoens / bad.js
Created August 1, 2014 19:30
Ext.create on prototype is bad!
Ext.define('MyApp.view.Grid', {
extend : 'Ext.grid.Panel',
xtype : 'myapp-grid',
//...
plugins : [
//Bad!
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit : 1
@mitchellsimoens
mitchellsimoens / .gitignore
Created July 11, 2014 14:08
.gitignore for an Ext5 app
# Things Cmd will touch on a build
build/
bootstrap.*
@mitchellsimoens
mitchellsimoens / keystrokefu.scpt
Created June 30, 2014 19:51
Automate text with AppleScript in Sencha Fiddle. Must have fiddle open and active tab, could do but meh
on theSplit(theString, theDelimiter)
-- save delimiters to restore old settings
set oldDelimiters to AppleScript's text item delimiters
-- set delimiters to delimiter to be used
set AppleScript's text item delimiters to theDelimiter
-- create the array
set theArray to every text item of theString
-- restore the old setting
set AppleScript's text item delimiters to oldDelimiters
-- return the result
@mitchellsimoens
mitchellsimoens / gist:9676974
Last active August 29, 2015 13:57
Route example
config : {
routes : {
'record:id' : function(id) {
console.log('record', id);
},
'comment:id' : function(id) {
console.log('comment', id);
},
'tab:id' : function(id) {
console.log('tab', id);
@mitchellsimoens
mitchellsimoens / gist:9521712
Last active August 29, 2015 13:57
Component element viewcontrollin
Ext.define('MyApp.view.Foo', {
extend : 'Ext.Component',
xtype : 'myapp-foo',
requires : [
'MyApp.view.FooController'
],
controller : 'foocontroller',