Skip to content

Instantly share code, notes, and snippets.

Mirko Akov mupkoo

Block or report user

Report or block mupkoo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mupkoo
mupkoo / .gitlab-ci.yml
Created Aug 22, 2017
Using Ember-CLI with Chrome on GitLab CI
View .gitlab-ci.yml
image: node:7.10
cache:
paths:
- node_modules/
- bower_components/
before_script:
# Install Chrome
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
_counter: 1,
actions: {
modifyChildren() {
let parent = this.get('model');
parent.get('children').then((children) => {
@mupkoo
mupkoo / number_to_words.php
Created Apr 7, 2017
PHP script to convert numbers to words in Bulgarian
View number_to_words.php
<?php
// Taken from the internet
// Slighly modified
function _n($single, $plural, $number) {
if ((int) $number == 1) {
return $single;
} else {
return $plural;
}
}
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
filter: 'all',
_parts: [
{ name: "Green", isArchived: false },
{ name: "Blue", isArchived: false },
{ name: "Yellow", isArchived: true }
View components.throw-error.js
import Ember from 'ember';
export default Ember.Component.extend({
throw: true,
init() {
this._super(...arguments);
Ember.assert('`throw` must be set to false', !this.get('throw'));
}
View components.increment-item.js
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
increment() {
this.get('onincrement')(this.get('value') + 1);
}
}
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@mupkoo
mupkoo / controllers.application.js
Last active Nov 28, 2016
Inputs in Ember Sortable
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
colors: ['green', 'red', 'blue'],
actions: {
reorder(colors) {
this.set('colors', colors);
@mupkoo
mupkoo / custom-helpers.js
Created Sep 16, 2016
Ember Page Object helper for Ember Power Select
View custom-helpers.js
// tests/pages/custom-helpers.js
import { buildSelector } from '../page-object';
import { typeInSearch, clickTrigger, nativeMouseUp } from '../helpers/ember-power-select';
export var powerSelectable = function (selector, options = {}) {
return {
isDescriptor: true,
value(value) {
wait().then(() => {
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
You can’t perform that action at this time.