Skip to content

Instantly share code, notes, and snippets.

View michelepatrassi's full-sized avatar
🌊
I’m the maker of ClubUp!, tech writer on Medium and startup addicted.

Michele michelepatrassi

🌊
I’m the maker of ClubUp!, tech writer on Medium and startup addicted.
View GitHub Profile
@Restuta
Restuta / the-bind-problem.jsx
Last active March 16, 2024 00:22
React, removeEventListener and bind(this) gotcha
/* Sometimes it's pretty easy to run ito troubles with React ES6 components.
Consider the following code: */
class EventStub extends Component {
componentDidMount() {
window.addEventListener('resize', this.onResize.bind(this)); //notice .bind
}
componentWillUnmount() {
window.removeEventListener('resize', this.onResize.bind(this));
/@0-mail\.com$/
/@0815\.ru$/
/@0815\.su$/
/@0clickemail\.com$/
/@0wnd\.net$/
/@0wnd\.org$/
/@10minutemail\.co\.za$/
/@10minutemail\.com$/
/@10minutemail\.de$/
/@123-m\.com$/
@btroncone
btroncone / ngrxintro.md
Last active June 26, 2024 08:27
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@grumpysi
grumpysi / Install Imagemagick PHP 7.0
Last active January 28, 2020 13:58
Install Imagemagick on Laravel Homestead box Ubuntu 14 + PHP 7.0
sudo apt-get update && sudo apt-get install -y imagemagick php-imagick && sudo service php7.0-fpm restart && sudo service apache2 restart
@sdnts
sdnts / example.md
Last active January 10, 2023 20:50
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});
@akexorcist
akexorcist / index.js
Last active November 17, 2022 11:25
Axios post method requesting with x-www-form-urlencoded content type. See https://axios-http.com/docs/urlencoded
const axios = require('axios')
/* ... */
const params = new URLSearchParams()
params.append('name', 'Akexorcist')
params.append('age', '28')
params.append('position', 'Android Developer')
params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/')
params.append('awesome', true)