Skip to content

Instantly share code, notes, and snippets.

View Im0rtality's full-sized avatar

Laurynas Veržukauskas Im0rtality

View GitHub Profile
@Im0rtality
Im0rtality / checklist.md
Last active July 1, 2020 12:12
The Web API Checklist

REST API Checklist

Tried to keep list concise as possible. Following points are actual specs, de facto conventions or good pratices.

  • Use nouns, avoid verbs (/getAccount/123 => /accounts/123)
  • Plural form
  • Base url: https://api.example.com (prefered over https://example.com/api/)
  • Versioning: https://api.example.com/v2/ (alternative: Accepts: application/json;application&v=2)
  • camelCase (most APIs are JSON based, JSON is JavaScript, Underscores are not JS convention)
  • Timestamps (2004-02-12T15:19:21+00:00 - ISO8061)
@Im0rtality
Im0rtality / README.md
Last active March 17, 2023 14:36
PHP CLI Debugging in Vagrant using Xdebug and PHPStorm

In host:

  1. Go to PHPStorm Settings > Project settings > PHP > Servers
  2. Add server with following parameters:
    • Name: vagrant (same as serverName= in debug script)
    • Host, port: set vagrant box IP and port
    • Debugger: Xdebug
    • [v] Use path mappings
    • Map your project root in host to relative dir in guest
  • Hit OK
@Im0rtality
Im0rtality / README.md
Last active August 29, 2015 13:57 — forked from friggeri/haiku

Haiku name generator

Original was in coffeescript, so I simply converted to JS to run in browser without dependencies.

Usage

  1. Open browser console
  2. Paste script above and hit enter
  3. Type haiku() to generate name
  4. Click Arrow up and then Enter to generate another one
@Im0rtality
Im0rtality / dev.md
Last active August 29, 2015 13:57
dashboard-rights-doc

Every Team member has the following rights:

  • To produce quality work at all times.
  • To know what is needed from the business with clear declarations of priority.
  • To ask for, and receive, help from peers, management, and customers.
  • To experiment with new ideas, technologies and roles to grow both as a professional and an individual.

See more at: http://lookforwardconsulting.com/2011/01/24/scrum-bill-of-rights/#sthash.PBWkRNR5.dpuf

@Im0rtality
Im0rtality / BaseModel.js
Last active August 29, 2015 13:57
Models in AngularJS
angular
.module('myApp.model.BaseModel', [])
.factory('BaseModel', ['$injector', 'CacheService', function ($injector, ModelStorage) {
'use strict';
function BaseModel() {}
BaseModel.prototype = {
$meta: {
name: 'BaseModel',

Syntax guide

Here’s an overview of Markdown syntax that you can use anywhere on GitHub.com or in your own text files.

Headers

This is an <h1> tag

This is an <h2> tag

This is an <h6> tag
require 'yaml'
dir = File.dirname(File.expand_path(__FILE__))
configValues = YAML.load_file("#{dir}/.vagrant/config.yaml")
data = configValues['vagrantfile']
Vagrant.configure("2") do |config|
# Box setup
config.vm.box = "#{data['vm']['box']}"
config.vm.box_url = "#{data['vm']['box_url']}"
@Im0rtality
Im0rtality / translation.lt.yml
Created January 14, 2014 18:39
Sylius lithuanian translation
sylius.address.first_name.not_blank: Please enter first name. Įrašykite savo vardą
#sylius.address.last_name.max_length: Last name must not be longer than 255 characters Pavardė negali būti ilgesnė nei 255 simboliai
#sylius.address.last_name.min_length: Last name must be at least 2 characters long Pavardė turi būti ilgesnė nei du simboliai
#sylius.address.postcode.max_length: Postcode must not be longer than 255 characters|Pašto kodas negali būti ilgesnis nei 255 simboliai
#sylius.address.postcode.min_length: Postcode must be at least 2 characters long Pašto kodas turi būti ilgesnis nei du simboliai
#sylius.address.street.max_length: Street must not be longer than 255 characters Gatvės pavadinimas negali būti ilgesnis nei 255 simboliai
#sylius.address.street.min_length: Street must be at least 2 characters long|Gatvės pavadinimas turi būti ilgesnis nei du simboliai
#sylius.country.name.max_length: Country Name must not be longer than 255 characters Šalies pavadinimas negali būti ilgesnis nei 255 simboliai
#s
@Im0rtality
Im0rtality / log
Last active January 1, 2016 02:49
sylius install does not check for GD
$ app/console sylius:install -e prod
Installing Sylius.
Checking system requirements.
PHP version and settings
PHP version OK
Recommanded PHP version OK
timezone OK
Deprecated timezone OK
detect_unicode OK
@Im0rtality
Im0rtality / live-support-chat.log
Last active December 31, 2015 18:29
Serveriai.lt apie vagrant/puppet
2013-12-18 20:31
Serveriai.lt pozicija apie pasidalinimą vagrant/puppet failais arba išsamia shared hostingo sistemos specifikacija
giedre: labas vakaras
Laurynas: sveiki, visą info pateikiau prieš tai buvusiame lange.
giedre: minutėlę prašau palaukti
giedre: dėkoju, kad palaukėte,
giedre: deja, tačiau vagrant/puppet skriptų pasiūlyti negalime.
Laurynas: kokios alternatyvos problemai spręsti?