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 / gist:2c1ee9894cd9106cacdc
Created Feb 20, 2015
Accordion component ReactJS
View gist:2c1ee9894cd9106cacdc
var Accordion = React.createClass({
changeCurrent: function (index) {
this.setState({ currentSection: index });
getInitialState: function() {
return {
currentSection: 0
View user_spec.rb
RSpec.describe User do
let(:user) { Fabricate(:user, password: 'C0mplex!', password_confirmation: 'C0mplex!') }
describe 'validations' do
describe 'email' do
it 'should be valid with a correct email' do
expect(user).to be_valid
it 'should have a valid format' do
mupkoo / form.hbs
Created Jun 11, 2015
Ember Simple Form
View form.hbs
{{#simple-form model=model action="save"}}
{{ simple-input type="text" value="name" }}
{{ simple-input type="email" value="email" }}
{{ simple-input type="textarea" value="body" label="Question" }}
{{ simple-input type="textarea" value="answer" }}
<div class="form-group">
{{ submit-button label="Add Question" isLoading=model.isSaving }}
{{ link-to "Cancel" "questions" class="btn btn-link" }}
View about.template.hbs
This is the about page
View json-request.js
import Ember from 'ember';
import icAjax from 'ic-ajax';
var jsonRequest = function (options) {
options = Ember.merge({
type: 'GET',
dataType: 'json',
contentType: 'application/json; charset=UTF-8'
}, options);
mupkoo / gulpfile.js
Last active Sep 29, 2015
Gulp task for a static websites
View gulpfile.js
var gulp = require('gulp');
var connect = require('gulp-connect');
var del = require('del');
var sourcemaps = require('gulp-sourcemaps');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var uncss = require('gulp-uncss');
var nano = require('gulp-cssnano');
var htmlmin = require('gulp-html-minifier');
var rev = require('gulp-rev');
mupkoo / application.controller.js
Last active Sep 30, 2015
Ember Checkbox focus-in event
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Checkbox focus test',
actions: {
focusInAction() {
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
currentIndex: 0,
actions: {
changeIndex(value, e) {
if (e.which === 40 || e.which === 38) {
this.set('currentIndex', this.get('currentIndex') - (39 - e.which));
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
items: [
mupkoo / country.js
Created Oct 13, 2015
Ember CLI Mirage JSONAPI helpers
View country.js
// factories/country.js
import Mirage, { faker } from 'ember-cli-mirage';
export default Mirage.Factory.extend({
type: 'countries',
// Attributes
iso: () => faker.address.countryCode().toLowerCase(),
You can’t perform that action at this time.