Skip to content

Instantly share code, notes, and snippets.

View ezy's full-sized avatar

Ezy ezy

  • Earth
View GitHub Profile
@ezy
ezy / .eslintrc.js
Last active March 21, 2018 00:29
Eslint for sails.js
module.exports = {
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"extends": "eslint:recommended",
"env": {
"node": true
},
@ezy
ezy / ember-test.js
Created February 2, 2018 00:40
Ember testing cheatsheet
// Visit URLS
andThen(() => {
visit('/url');
});
// Fill in inputs
fillIn('input#id', 'string');
// Click things
click('button#submit-button');
@ezy
ezy / testem.js
Last active November 29, 2017 01:57
Chrome headless testem file for ember qunit
/* eslint-env node */
module.exports = {
framework: 'qunit',
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: ['Chrome'],
launch_in_dev: ['Chrome'],
browser_args: {
'Chrome': ['--headless', '--disable-gpu', '--remote-debugging-port=9222'],
},
@ezy
ezy / keybase.md
Created November 28, 2017 04:45
Keybase

Keybase proof

I hereby claim:

  • I am ezy on github.
  • I am ezy (https://keybase.io/ezy) on keybase.
  • I have a public key ASC0oNSQPo-9fqUaq6Rd92DxoG2afbTdPoEwm0D8ULUeDgo

To claim this, I am signing this object:

@ezy
ezy / Angular-cli.md
Created May 22, 2017 07:47 — forked from cortesben/Angular-cli.md
Bash commands and Angular CLI commands

#Angular-cli oh shit!

https://cli.angular.io/reference.pdf

Commands Description
ng help returns all commands with flags they can take as a param
ng new [project-name] create a brand new angular project with live server BANG!
ng init grabs name from folder that already exist
@ezy
ezy / ember-owner.js
Last active May 21, 2017 23:16 — forked from eliotsykes/current-route-query-params-ember-component.js
How to lookup or resolve other class instances, or register new factories into the owner.
/**
* For Ember < 2.4
*/
this.get('container').lookup('router:main').router.state;
/**
* For Ember > 2.4
*/
import Ember from 'ember';
const { getOwner } = Ember;
@ezy
ezy / noscript.html
Created May 17, 2017 04:24
No Javascript enabled
<noscript>
<div class="alert alert-danger">
You must have Javascript enabled to use this site. Please enable Javascript and reload the page.
</div>
</noscript>
@ezy
ezy / Postgres.txt
Last active August 11, 2017 01:49
Useful postgres commands
Login to postgresql:
psql -d mydb -U myuser -W
psql -h myhost -d mydb -U myuser -W
psql -U myuser -h myhost "dbname=mydb sslmode=require" # ssl connection
Default Admin Login:
sudo -u postgres psql -U postgres
sudo -u postgres psql
List databases on postgresql server:
@ezy
ezy / components.child-component.js
Created March 6, 2017 20:10
Input send action states
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
setAutoRefresh() {
console.log(this.get('autoRefresh'));
if (this.get('autoRefresh') === true) {
Ember.run.later(function() {
console.log('refreshed');
this.sendAction('setAutoRefresh');
@ezy
ezy / console-timer.js
Created February 27, 2017 02:38
Records performance of a function execution in JS
console.time('someFunction');
someFunction(); // run whatever needs to be timed in between the statements
console.timeEnd('someFunction');