Skip to content

Instantly share code, notes, and snippets.

View amcsi's full-sized avatar
🏠
Working from home

Attila Szeremi amcsi

🏠
Working from home
View GitHub Profile
@amcsi
amcsi / script.js
Created July 8, 2018 13:04
Vue Form Handling example
return {
methods: {
async submitForm() {
try {
await axios.post('...', this.data);
} catch (e) {
const handled = tryHandleFormErrors(e);
if (!handled) {
handleUnexpectedErrors(e);
}
@amcsi
amcsi / bla.js
Created June 30, 2018 01:33
asdf
$(function () {
});
function handler () {
var d = 5;
console.info('I was clicked');
backgroundColorer(buttonEl);
}
Testing started at 18:26 ...
/usr/bin/php /home/attila/0/ttg/obx-web/vendor/phpunit/phpunit/phpunit --repeat 500 --configuration /home/attila/0/ttg/obx-web/phpunit.xml --filter "/(::testGenerate)( .*)?$/" App\Common\IdTest /home/attila/0/ttg/obx-web/app/Common/IdTest.php --teamcity
PHPUnit 7.2.4 by Sebastian Bergmann and contributors.
Failed asserting that two strings are identical.
Expected :'33ex8WAnmNA'
Actual :'33ex8WAnmQA'
<Click to see difference>
C:/Users/attila/.cargo/bin/cargo.exe run
Compiling password-cracker v0.1.0 (file:///C:/0/quick/password-cracker)
warning: unused import: `std::ops::Range`
--> src\main.rs:5:5
|
5 | use std::ops::Range;
| ^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default
extern crate rayon;
use rayon::prelude::*;
use std::str;
use std::ops::Range;
use rayon::range::Iter;
fn main() {
crack("zzzzz");
}
@amcsi
amcsi / logs
Last active March 28, 2018 21:16
Systemd result of removing Restart=Always
root@www:~/szeremi-nginx (master *)# systemctl status szeremi-nginx
● szeremi-nginx.service - Autoconfigured Nginx-Reverse-Proxy
Loaded: loaded (/root/szeremi-nginx/units/szeremi-nginx.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Wed 2018-03-28 21:14:02 UTC; 1min 7s ago
Process: 28666 ExecStop=/usr/bin/docker stop %p (code=exited, status=0/SUCCESS)
Process: 28473 ExecStart=/usr/bin/docker start %p (code=exited, status=0/SUCCESS)
Process: 28465 ExecStartPre=/usr/bin/docker network connect szeremi %p (code=exited, status=0/SUCCESS)
Process: 28453 ExecStartPre=/usr/bin/docker create --rm --name %p -p 80:80 -p 443:443 -v /certs:/etc/nginx/certs:ro -v /etc/nginx/vhost.d -v /usr/share/nginx/html -v /var/run/docker.sock:/tmp/docker.sock ${CONTA
Process: 28445 ExecStartPre=/usr/bin/docker rm %p (code=exited, status=1/FAILURE)
Process: 28437 ExecStartPre=/usr/bin/docker kill %p (code=exited, status=1/FAILURE)
@amcsi
amcsi / myanimelist-alternatives.md
Last active February 27, 2018 04:00 — forked from cheeaun/myanimelist-alternatives.md
MyAnimeList.net alternatives
@amcsi
amcsi / output.txt
Created October 15, 2017 15:29
Can't stop or kill the container
root@www:~/szeremi-nginx (master)# docker stop --time=1 phpunit-failures
phpunit-failures
root@www:~/szeremi-nginx (master)# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e277c2c43887 3c57f4edf595 "npm run start" 22 minutes ago Up 22 minutes 1337/tcp phpunit-failures
#!/usr/bin/env bash
# Break on error.
set -e
cd "$(dirname "$0")"/..
composer install
bin/api odm:generate:proxies
<?php
declare(strict_types=1);
/**
* Walks nested array structures to retrieve values.
*/
class ArrayWalkerValue
{
/**