Skip to content

Instantly share code, notes, and snippets.

@BPagoaga
BPagoaga / .eslintrc.js
Created September 21, 2017 19:36
Eslint config
// http://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parser: "babel-eslint",
parserOptions: {
sourceType: "module"
},
env: {
browser: true
adblock
disconnect
jsonlite
react developer tools
vuejs devtools
wappalyzer
@BPagoaga
BPagoaga / app.component.html
Created June 4, 2018 11:37
Group of checkboxes in an angular reactive form
<!--The content below is only a placeholder and can be replaced.-->
<div style="text-align:center">
<form [formGroup]="testForm" (ngSubmit)="onSubmitForm()">
<div class="form-group" [formGroup]="testForm.controls.availableDaysForm">
<label for="firstName">Prénom</label>
<input type="checkbox" class="form-control" formControlName="lundi">
@BPagoaga
BPagoaga / README.md
Last active January 4, 2019 13:35
Plug Vue.js into Symfony 1.4

In the highly improbable case you would need to plug Vue.js into a Symfony 1.4 app, here is how I did it.

No webpack.

Gulp was used with gulp-babel and gulp-polyfill to support ES6 and async/await.

@BPagoaga
BPagoaga / connect-react-redux.jsx
Created February 6, 2019 14:48
React/Redux snippets
// action creator
const addMessage = (message) => {
return {
type: 'ADD',
message: message
}
};
const mapStateToProps = (state) => {
return {
@BPagoaga
BPagoaga / app.component.html
Last active February 25, 2019 11:06
How to force all parents of a component to implement an interface
<app-child-component></app-child-component>
@BPagoaga
BPagoaga / remote-debugging.md
Created November 16, 2020 14:15
Remote debugging

How to remote debug

Debug a project accessed from a remote device.This device should be connected to your local machine via usb.

Step 1: serve your project on host 0.0.0.0

To be able to access your local project from a remote device, you might serve it on the 0.0.0.0 host: npm start -- --host 0.0.0.0

Step 2: activate the usb debugging on your remote device

{"version": 1, "uid": 6585475841242380086, "layout": [[["KC_ESCAPE", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_LBRACKET", "KC_PGUP", "KC_PGDOWN", "KC_RBRACKET", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_BSPACE"], ["KC_TAB", "KC_A", "KC_W", "KC_E", "KC_R", "KC_T", "KC_MINUS", "KC_VOLU", "KC_VOLD", "KC_EQUAL", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSLASH"], ["KC_CAPSLOCK", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_COMMA", "KC_INSERT", "KC_HOME", "KC_DOT", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCOLON", "KC_ENTER"], ["KC_LSHIFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_SPACE", "KC_BSPACE", "KC_DELETE", "KC_SPACE", "KC_N", "KC_M", "KC_COMMA", "KC_DOT", "KC_UP", "KC_RSHIFT"], ["KC_LCTRL", "KC_LGUI", "KC_LALT", "KC_VOLU", "KC_VOLD", "KC_PSCREEN", -1, -1, -1, -1, "KC_MUTE", "KC_QUOTE", "KC_SLASH", "KC_LEFT", "KC_DOWN", "KC_RIGHT"], ["KC_ESCAPE", "KC_F", "KC_W", "KC_E", "KC_R", "KC_T", -1, -1, -1, -1, "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPACE"], ["KC_CAPSLOCK", "KC_A", "KC_S", "KC_D", "KC_F", "K
@BPagoaga
BPagoaga / install.sh
Last active October 28, 2024 14:32
Workflow
sudo apt update && sudo apt upgrade -y && sudo apt install git -y
# add ssh agent to git
# download catppuccin themes for alacritty, zellij, btop
# nvm
# sdkman
# github cli
# alacritty ou wezterm ?