Skip to content

Instantly share code, notes, and snippets.

View AvraamMavridis's full-sized avatar
🎯
Focusing

Avraam Mavridis AvraamMavridis

🎯
Focusing
View GitHub Profile
@th3hunt
th3hunt / pan.js
Last active August 19, 2020 08:14
Pan gesture helpers
/**
* Pan
* ---
*
* A collection one-finger Pan gesture recognizers.
*
* A pan is an omnidirectional one- or two-finger gesture that expands the field of view.
* Drag is typically used with pan.
*
*/
@bvaughn
bvaughn / index.md
Last active April 3, 2024 07:41
Interaction tracing with React

This API was removed in React 17


Interaction tracing with React

React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".

With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.

@mehiel
mehiel / FluxComponent.js
Last active August 29, 2018 17:45
Thinking on a FluxComponent
import { Component } from 'react'
import propOr from 'ramda/src/propOr'
import identity from 'ramda/src/identity'
import map from 'ramda/src/map'
import compose from 'ramda/src/compose'
class FluxComponent extends Component {
static createReducer = (initialState, handlers) => (state = {}, action) =>
propOr(identity, action.type, handlers)(state, action)
@v0lkan
v0lkan / invalidate.js
Created March 13, 2017 16:38
Invalidates ServiceWorkers so that you can fetch your assets freshly.
/**
* Invalidates the current `ServiceWorker` running on the page.
* Why? Because managing a cache is damn hard; and sometimes due to race conditions
* your assets might get out-of-sync.
*
* This mini snippet checks the version of the app against an uncached resource and
* invalidates the workers if it finds a mismatch.
*/
if ( navigator.serviceWorker && navigator.serviceWorker.getRegistrations ) {
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' +
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' +
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' +
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));';
try {
eval(str);
} catch(e) {
alert('Your browser does not support ES6!')
}
@nepsilon
nepsilon / 3-hidden-python-tips.md
Last active October 20, 2016 02:11
3 hidden Python tips — First published in fullweb.io issue #60

3 hidden Python tips 🐍

Hidden from beginner tutorials and seldom found in books.

1. You can multiply a string to repeated it:

>>> "HOOLI-"*2
'HOOLI-HOOLI-'
@rmkane
rmkane / GAME_DATA_HISTORY.json
Last active April 19, 2024 07:17
Pokemon GO - Game Data Statistics
[ {
"Date" : "2016-07-30",
"Data" : {
"Moves" : [
{ "ID" : 13, "Key" : "Power", "Old Value" : 15, "New Value" : 25 },
{ "ID" : 14, "Key" : "Power", "Old Value" : 70, "New Value" : 120 },
{ "ID" : 18, "Key" : "Power", "Old Value" : 25, "New Value" : 30 },
{ "ID" : 20, "Key" : "Power", "Old Value" : 15, "New Value" : 25 },
{ "ID" : 21, "Key" : "Power", "Old Value" : 35, "New Value" : 40 },
{ "ID" : 22, "Key" : "Power", "Old Value" : 55, "New Value" : 80 },
@nepsilon
nepsilon / a-better-setup-for-git.md
Last active October 19, 2020 19:15
A better setup for Git — First published in fullweb.io issue #46

A better setup for Git

Git default configuration is good but it can be personalized to improve your workflow efficiency. Here are some good lines to put in your ~/.gitconfig:

# The basics, who you commit as:
[user]
  name = John Doe
  email = [email protected]
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@miglen
miglen / aws-certification.md
Last active August 1, 2024 14:08
AWS Certification guide and notes on how to prepare for the aws associate certification architect, sysops and developer exams


AWS Certification notes

Those are my personal notes on AWS Solution Architect certification preparation. Hope you find them usefull.

To pass AWS certification, you should have:

  • Sound knowledge about most of the AWS services ( EC2, VPC, RDS, Cloudfront, S3, Route53 etc,)
  • Hands on experience with AWS services.