Skip to content

Instantly share code, notes, and snippets.

Ivan Mrvelj imrvelj

Block or report user

Report or block imrvelj

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
@imrvelj
imrvelj / Knex-Migrations-Seeding.md
Created Jun 29, 2019 — forked from NigelEarle/Knex-Migrations-Seeding.md
Migration and seeding instructions using Knex.js!
View Knex-Migrations-Seeding.md

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

@imrvelj
imrvelj / install_intelr_graphic_linux_firmware.sh
Created Oct 20, 2017 — forked from zas/install_intelr_graphic_linux_firmware.sh
Fix "W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1.bin for module i915_bpo" (Ubuntu 16.04, kernel 4.4)
View install_intelr_graphic_linux_firmware.sh
#!/bin/bash
cd
wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/sklgucver61.tar.bz2 && \
tar xvjf sklgucver61.tar.bz2 && cd skl_guc_ver6_1/ && sudo ./install.sh
cd
wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/kbldmcver101.tar.bz2 && \
@imrvelj
imrvelj / arch-linux-install
Created May 24, 2017 — forked from binaerbaum/arch-linux-install
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
View arch-linux-install
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swiss-french keymap
View Arch Linux mkinitcpio: Possibly missing firmware for module.md

Problem

In Arch Linux mkinitcpio -p linux

shows

Possibly missing firmware for module: aic94xx
 Possibly missing firmware for module: wd719x
@imrvelj
imrvelj / .babelrc
Created Mar 20, 2017 — forked from JamieMason/.babelrc
Tree-Shaking with Babel 6, Webpack 2, and React.
View .babelrc
{
"presets": [
["es2015", {
"es2015": {
"loose": true,
"modules": false
}
}], "react"
]
}
@imrvelj
imrvelj / markdown.md
Created Feb 22, 2017 — forked from rikukissa/POST.md
Unit testing Angular.js app with node.js, mocha, angular-mocks and jsdom
View markdown.md

Testing Angular.js app headlessly with node.js + mocha

Lean unit tests with minimal setup

Code examples

Keypoints

  • Fake DOM (Everything works without a real browser)
  • Uses ngMocks to inject and mock Angular.js dependencies
  • I'm assuming you are already using browserify (but everything works fine without it)
@imrvelj
imrvelj / README.md
Created Jan 19, 2017 — forked from tjamps/README.md
Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle
View README.md

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. v1.api.example.com)

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

View angular-just-say-no.md

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 http://bit.ly/angular-just-say-no and http://bit.ly/angularjustsayno, btw.

@imrvelj
imrvelj / .gitconfig
Last active Nov 15, 2015 — forked from pksunkara/.gitconfig
Sample of git config file (Example .gitconfig)
View .gitconfig
[user]
name = Ivan Mrvelj
email = sk8raid@gmail.com
[core]
editor = atom
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[web]
browser = firefox
[instaweb]
You can’t perform that action at this time.