Skip to content

Instantly share code, notes, and snippets.

View infinite-system's full-sized avatar
🏠
Working from home

Evgeny Kalashnikov infinite-system

🏠
Working from home
  • Infinite System
  • Toronto, Canada
View GitHub Profile
<body>
<div id="app">
<div class="nes-container with-title is-centered">
<p class="title">Vue Form Test</p>
<form @submit.prevent="submit">
<div class="nes-field">
<label for="name_field">Character Name</label>
<input placeholder="Enter name here" type="text"
name="name"
id="name_field" class="nes-input" />
@yoyosan
yoyosan / Upload.php.md
Last active September 3, 2023 01:50
File upload example for Quasar framework
// Laravel 7 example

namespace App\Http\Controllers;

class Contact extends Controller
{
    // ...

    /**
@leocavalcante
leocavalcante / watch.php
Created February 21, 2019 20:45
Watch script for Swoole HTTP server restarts.
<?php declare(strict_types=1);
require_once __DIR__.'/vendor/autoload.php';
use Symfony\Component\Process\Process;
$process = new Process(['php', 'index.php']);
echo "Starting process\n";
$process->start();
@Jeff-Russ
Jeff-Russ / Array Objects in PHP.md
Last active July 8, 2024 08:05
PHP: ArrayObject, IteratorAggregate , ArrayAccess , Serializable , Countable

Array Objects in PHP

Array are not object in PHP but PHP does give us some ways to make object that act like arrays. First, there is the ArrayObject class which is pretty close to what you have with a normal array (you can iterate it, use [] etc.) If you use it as a parent for your class you can add methods to it.

class ArrObj extends ArrayObject{
	// add methods here
@EtienneLem
EtienneLem / ajax_worker.js
Created June 10, 2013 19:40
Ajax Web Worker
var handleRequest = function(data) {
postMessage(data)
}
addEventListener('message', function(e) {
var xhr = new XMLHttpRequest
xhr.open('GET', e.data)
xhr.onreadystatechange = function(e) {
if (xhr.readyState === 4 && xhr.status === 200) {
handleRequest(xhr.responseText)