Skip to content

Instantly share code, notes, and snippets.

Undefined is not a function

Ivan Mrvelj imrvelj

Undefined is not a function
View GitHub Profile
imrvelj / gist:ad17b379bf6777930fdb
Last active Aug 29, 2015
Disabling Mouse Acceleration -- bash script
View gist:ad17b379bf6777930fdb
#wait for the desktop to settle
sleep 5
# turn off mouse acceleration
# number after '--set-prop' is your mouse id which you can find out by running 'xinput list'
xinput --set-prop 14 'Device Accel Profile' -1
xinput --set-prop 15 'Device Accel Profile' -1
xinput --set-prop 14 'Device Accel Velocity Scaling' 1
xinput --set-prop 15 'Device Accel Velocity Scaling' 1
imrvelj / .gitconfig
Last active Nov 15, 2015 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
View .gitconfig
name = Ivan Mrvelj
email =
editor = atom
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
browser = firefox
View fullcal_dir
"use strict";
angular.module("Main").directive("activitycalendar", function () {
return {
link: function (scope, elm) {
var $el = angular.element(elm);
function refreshCalendar() {
var curCalView = $el.fullCalendar("getView");
var moment = null;
View IDEA linux font fix
# eg Webstorm bin/webstorm64.vmoptions
View projectSetup
Open terminal => CTRL+ALT+T
Make a folder for your project
1. mkdir project
2. cd project
3. npm init
=> fill out all the needed stuff; name, description, whatever
View Base16Oceanic Xresources
*foreground: #999697
*background: #1b1b1b
! black
*color0: #1b1b1b
*color8: #444444
! red
*color1: #683e3e
*color9: #7b4e50
View .eslintrc
"extends": "standard",
"ecmaFeatures": {
"jsx": true,
"modules": true
"env": {
"browser": true,
"node": true

Angular: Just say no

A collection of articles by AngularJS veterans, sometimes even core committers, that explain in detail what's wrong with Angular 1.x, how Angular 2 isn't the future, and why you should avoid the entire thing at all costs unless you want to spend the next few years in hell.

Reason for this: I'm getting tired of having to explain to everyone, chief of which all the indiscriminate Google Kool-Aid™ drinkers, why I have never believed in Angular, why I think it'll publicly fail pretty soon now (a couple years), and why it's a dead end IMO. This gist serves as a quick target I can point people to in order not to have to parrot / compile the core of the articles below everytime. Their compounded reading pretty much captures 99% of my view on the topic.

This page is accessible through and, btw.

View Infinality *buntu
sudo add-apt-repository ppa:no1wantdthisname/ppa && apdejt && apti fontconfig-infinality
# configuration
sudo bash /etc/fonts/infinality/ setstyle
/etc/profile.d/ -> open -> USE_STYLE = [ OSX || DEFAULT || UBUNTU ]
imrvelj /
Created Jan 19, 2017 — forked from tjamps/
Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

The API we are creating in this gist will follow these rules :

  • The API only returns JSON responses
  • All API routes require authentication
  • Authentication is handled via OAuth2 with password Grant Type only (no need for Authorization pages and such).
  • API versioning is managed via a subdomain (e.g.

The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :