Skip to content

Instantly share code, notes, and snippets.

View toioski's full-sized avatar

Vittorio Morganti toioski

View GitHub Profile
@toioski
toioski / GUIDE.md
Last active April 9, 2021 08:45
Create and run a Sylius project on macOS

Create and run a Sylius project on macOS

Create the project

  • Install PHPBrew to manage multiple PHP versions
  • Install Docker
  • Install globally the library Argon2 used by PHP for password hashing. It must be installed globally because it's used to build PHP itself.
    brew install argon2
    
  • Install with PHPBrew a version of PHP compatibly with Sylius (^7.2)
@toioski
toioski / moentate-api-overlay-response.ts
Created March 25, 2020 10:24
Monetate "Overlay" JSON response
// Excel reference file: https://docs.google.com/spreadsheets/d/1QqrhoaTxDEbzShiJHBdLbL_zs2dhvN355AQJ2fRbIx4
// ----------------
// Types definition
// ----------------
enum Language {
ar = "ar",
de = "de",
en = "en",
@toioski
toioski / monetate-api-discount-response.ts
Last active March 5, 2020 11:02
Monetate "Discount" JSON response
// Excel reference file: https://docs.google.com/spreadsheets/d/1QqrhoaTxDEbzShiJHBdLbL_zs2dhvN355AQJ2fRbIx4
// ----------------
// Types definition
// ----------------
enum Language {
ar = "ar",
de = "de",
en = "en",
@toioski
toioski / monetate-api-message-response.ts
Last active July 16, 2020 13:37
Monetate "Message" JSON response
// Excel reference file: https://docs.google.com/spreadsheets/d/1QqrhoaTxDEbzShiJHBdLbL_zs2dhvN355AQJ2fRbIx4
enum Language {
ar = "ar",
de = "de",
en = "en",
es = "es",
fr = "fr",
it = "it",
zh = "zh",
@toioski
toioski / script.applescript
Last active June 5, 2023 01:30
Automatically Open Safari Dev Tools for iOS Simulator
-- `menu_click`, by Jacob Rus, September 2006.
-- Ref: https://stackoverflow.com/questions/14669542/automatically-open-the-safari-debugger-when-the-iphone-simulator-is-launched
on menu_click(mList)
local appName, topMenu, r
-- Validate our input
if mList's length < 3 then error "Menu list is not long enough"
-- Set these variables for clarity and brevity later on
@toioski
toioski / index.html
Created August 29, 2017 14:46
switchMap vs mergeMap deep explained (source http://jsbin.com/hehaqi)
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[switchMap vs mergeMap of RxJS]">
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/2.3.22/rx.all.js"></script>
<title>JS Bin</title>
<script src="http://cdn.jsdelivr.net/rsvp/3.0.6/rsvp.js"></script>
</head>
<body>
<script id="jsbin-javascript">
@toioski
toioski / README.md
Last active February 23, 2023 16:04
Configure Technicolor TG582N as WAN router for gaming (DMZ, Port forwarding)

Prerequisites

Useful information

  • Technicolor is a company of Thomson, this is the reason we will use the Thomson flashing software
  • The default credentials for 8.x.x.x firmware version of TG582N is user: admin password: ROUTER_SERIAL_NUMBER (you can find the serial number under your router)

Configuration

@toioski
toioski / guide.md
Created November 2, 2016 20:16
Import OVA/OVF virtual machine to Parallels Desktop
  1. Open OVA/OVF file with VirtualBox
  2. Right click the virtual machine and select 'Clone'
  3. Import the generated .vbox file with Parallels Desktop
@toioski
toioski / tips.sh
Last active January 9, 2017 19:45
OSX command tips
#!/usr/bin/env bash
# Disable DMG integrity verification process
defaults write com.apple.frameworks.diskimages skip-verify true
# Speed up Time machine backups
sudo sysctl debug.lowpri_throttle_enabled=0
@toioski
toioski / UIButton+ClipBackgroundImageToBounds.swift
Last active August 29, 2015 14:17
Conversion to Swift of Barry Allard UIView+ClipBackgroundImageToBounds
//
// UIView+ClipBackgroundImageToBounds.m
//
// Created by Barry Allard on 2013-06-18.
// Copyright (c) 2013 Stealth Mode Industries LLC. All rights reserved.
//
// Based on http://stackoverflow.com/questions/262156/uiimage-rounded-corners
//
// MIT License