Skip to content

Instantly share code, notes, and snippets.

View lolmaus's full-sized avatar
🧠
Reducing entropy

Andrey Mikhaylov (lolmaus) lolmaus

🧠
Reducing entropy
View GitHub Profile
@lolmaus
lolmaus / fah_restart.bat
Created February 11, 2022 08:46
C:\Users\lolmaus\AppData\Roaming\FAHClient\fah_restart.bat
@echo off
chcp 1251 >nul
set ln=Процесс fahcore найден!
set msg=FAHClient был перезапущен
chcp 866 >nul
:loop
cd %appdata%\FAHClient\
tasklist /fi "imagename eq fahcore_21.exe" | find /i "fahcore_21.exe" > nul
if not errorlevel 1 set res=true
tasklist /fi "imagename eq fahcore_22.exe" | find /i "fahcore_22.exe" > nul
import Controller from '@ember/controller';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
class WithTrackedValue {
@tracked
value = false;
}
export default class ApplicationController extends Controller {
import Controller from '@ember/controller';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import { cached } from 'tracked-toolbox';
class Person {
@tracked firstName = 'Jen';
@tracked lastName = 'Weber';
@cached
@lolmaus
lolmaus / controllers.index\.js
Created November 16, 2021 09:57
Modifier on LinkTo
import Controller from '@ember/controller';
import { action } from '@ember/object';
export default class ApplicationController extends Controller {
@action alert() {
alert('Action happened');
}
}
@lolmaus
lolmaus / overcoming-cucumber.md
Last active September 8, 2021 09:36
Behavior-Driven Development: Overcoming Cucumber. Transcript of talk by Andrey Mikhaylov (lolmaus)
@lolmaus
lolmaus / controllers.application\.js
Created August 17, 2021 17:35
Disabled button inside a
import Controller from '@ember/controller';
import { action } from '@ember/object';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
@action foo() {
alert('clicked');
}
@lolmaus
lolmaus / controllers.application\.js
Last active August 3, 2021 15:28
Ember Conucrrency perform helper vs Qunit
import Controller from '@ember/controller';
import { task } from 'ember-concurrency';
import { waitFor } from '@ember/test-waiters';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
@waitFor
reject() {
return new Promise((resolve, reject) => reject(new Error('SHOOP DA WHOOP!')));
import Controller from '@ember/controller';
import { TrackedArray } from 'tracked-built-ins';
import { action } from '@ember/object';
export default class ApplicationController extends Controller {
appName = 'particial application';
values = new TrackedArray([0, 1, 2, 3, 4, 'omg']);
@action handleInput(event) {
this.values[0] = event.target.value;
@lolmaus
lolmaus / Ссылки к докладу по Cucumber (EmberNN).md
Last active June 8, 2021 12:46
Ссылки к докладу по Cucumber (EmberNN 2021)
@lolmaus
lolmaus / _settings.json
Created April 7, 2021 13:56
Change the color of ESLint syntax highlighting: fixable are blue, non-fixable are yellow. For `vscode-eslint` v2.1.20+. https://github.com/microsoft/vscode-eslint/pull/1164
{
"eslint.rules.customizations": [
{ "rule": "*", "severity": "warn" }
{ "rule": "no-extra-boolean-cast", "severity": "info" },
{ "rule": "no-extra-parens", "severity": "info" },
{ "rule": "no-extra-semi", "severity": "info" },
{ "rule": "no-regex-spaces", "severity": "info" },
{ "rule": "curly", "severity": "info" },
{ "rule": "dot-location", "severity": "info" },
{ "rule": "dot-notation", "severity": "info" },