Skip to content

Instantly share code, notes, and snippets.

View eyecatchup's full-sized avatar

Stephan Schmitz eyecatchup

View GitHub Profile
@travisbrown
travisbrown / legacy-verified.csv
Last active August 2, 2023 13:59
Twitter accounts with legacy verification on 4 April 2023 (see https://twitter.com/travisbrown/status/1643229276278235136)
We can't make this file beautiful and searchable because it's too large.
Twitter ID, Screen name, Followers
12,jack,6526006
13,biz,2608289
20,ev,1679155
57,SarahM,17448
59,Tim535353,9340
76,marciadorsey,19501
224,davepell,57523
291,goldman,916937
295,joshk,149086
@eyecatchup
eyecatchup / vue.config.js
Created September 25, 2020 10:57
(Vue.js) Webpack dev server config to use a (corporate) proxy
const HttpsProxyAgent = require('https-proxy-agent')
const proxy = new HttpsProxyAgent('http://1.2.3.4:3128')
module.exports = {
// ...
configureWebpack: {
devServer: {
// ...
proxy: {
@eyecatchup
eyecatchup / search-devtools-history.md
Created May 24, 2019 07:06
Search Chrome Devtools history

Search Chrome Devtools history

  1. Undock the console (click on the icon in the bottom-left corner, ![undock icon][1]).
    (if you don't see ![the undock icon][2], but ![][3], then hold the mouse pressed for a few seconds to get the desired icon)
  2. Press Ctrl + Shift + J to open the console for this console. (On OSX use Cmd + Option + i)
  3. Use the following snippet to get an array of matches for your search term:
const searchHistory = query => {console.dir(JSON.parse(localStorage.getItem('consoleHistory')).filter(function(item){ return ~item.indexOf(query);}))}
searchHistory('token')
@eyecatchup
eyecatchup / smooth-scrolling-polyfill.md
Last active September 8, 2023 06:32
Smooth Scroll behavior polyfill

The Scroll Behavior specification has been introduced as an extension of the Window interface to allow for the developer to opt in to native smooth scrolling. To date this has only been implemented in Chrome, Firefox and Opera.

There's a complete polyfill here (3.3KB minified). But most of the times, the following is enough for me (641 bytes minified):

smooth-scrolling-poyfill.js

Use as: scrollToElem('#elem-selector');

@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active April 24, 2024 16:27
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@surma
surma / package.json
Created April 18, 2018 15:07
Boilerplate for quick one-off TypeScript projects. Just run `npm start`
{
"name": "tsquickstart",
"version": "1.0.0",
"description": "Boilerplate for quick one-off TypeScript projects. Just run `npm start`",
"scripts": {
"init": "test -f tsconfig.json || (tsc --init -t ESNext -m ESNext && npm install)",
"start": "npm run init && concurrently \"npm run watch\" \"npm run serve\"",
"serve": "http-server",
"watch": "tsc -p . --watch",
"build": "tsc -p ."
/* Helper function, required if jQuery is not available */
var ajax = function ajax(method, url, callback) {
var xhr = !!window.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP");
xhr.onreadystatechange = function() {4 == this.readyState && callback(xhr)};
xhr.open(method, url, true);
xhr.send();
};
function do_something(coords) {
// Do something with the coords here
@eyecatchup
eyecatchup / git-tricks.md
Created June 26, 2017 22:27
Git Tricks

Git Tips & Tricks

Oups Tricks

The "I forgot something in my last commit" Trick

# first: stage the changes you want incorporated in the previous commit
 
# use -C to reuse the previous commit message in the HEAD

CSS Compression


Resources to help comparing & evaluating different CSS compressing techniques in general, and specifically different open-source CSS compressor implementations, with a clear focus on, but not limited to, JS/NodeJS based tools.

(CSS) Compression Techniques

"Long, fragile lists of self-contradictory rules"
Douglas Crockford on CSS

(function(window) {
"use strict";
var mutations = {
attrib: [],
childs: {
add: [],
del: []
}
};