Skip to content

Instantly share code, notes, and snippets.

View dr-dimitru's full-sized avatar
👨‍💻
get 💩 done

dr.dimitru dr-dimitru

👨‍💻
get 💩 done
View GitHub Profile
@dr-dimitru
dr-dimitru / .eslintignore
Created August 12, 2018 15:53
ESLint settings 2018
android_bundle/
dev_bundle/
docs/
examples/
packages/
scripts/
tools/
!tools/*.js
!tools/isobuild/*.js
!tools/catalog/*.js
@dr-dimitru
dr-dimitru / string-concatenation-vs-interpolation.md
Created August 26, 2018 12:39
JSPerf: string concatenation vs interpolation
@dr-dimitru
dr-dimitru / keybase.md
Created August 30, 2018 22:21
keybase.md

Keybase proof

I hereby claim:

  • I am dr-dimitru on github.
  • I am smart_egg (https://keybase.io/smart_egg) on keybase.
  • I have a public key whose fingerprint is FD12 88FD AEE7 5AEC 7CEE 98E3 F554 6F8B 9B1B 179B

To claim this, I am signing this object:

@dr-dimitru
dr-dimitru / .eslintignore
Last active October 4, 2018 08:38
Sublime Text 3 setup
android_bundle/
dev_bundle/
docs/
examples/
packages/
scripts/
tools/
!tools/*.js
!tools/isobuild/*.js
!tools/catalog/*.js
@dr-dimitru
dr-dimitru / curl-commands.sh
Last active October 6, 2018 18:57
Query website as GoogleBot using curl
# As default browser:
curl http://example.com
# As GoogleBot:
curl -A GoogleBot http://example.com
# As GoogleBot (old/deprecated) style:
curl -A GoogleBot http://example.com?_escaped_fragment_=
@dr-dimitru
dr-dimitru / medium-follow-all-on-page.js
Created March 13, 2019 06:33
Follow all users on open page at Medium.com
// Better to execute this in Google Chrome
// 0. Go to medium.com on the page where you would like to Follow other users
// 1. Right click on any place of page
// 2. Inspect Element
// 3. In opened panel - choose "console" tab
// 4. Copy-paste code you se below and hit "Enter" key
(function(){
var newscript = document.createElement('script');
newscript.type = 'text/javascript';
@dr-dimitru
dr-dimitru / twitter-follow-all-on-page.js
Last active May 5, 2019 21:34
Follow all accounts displayed on a page
// Better to execute this in Google Chrome
// 0. Go to twitter on the page where you would like to Follow other users (with [follow] buttons)
// 1. Right click on any place of page
// 2. Inspect Element
// 3. In opened panel - choose "console" tab
// 4. Copy-paste code you se below and hit "Enter" key
// Note: Twitter will block if you're going to follow a lot users instantly
// Script below adds between 1.5 and 4 seconds between each "follow" (button click), so you can start it and leave it for a while
(function(){
@dr-dimitru
dr-dimitru / .htaccess
Last active October 30, 2019 12:07
Installable PWA 101
# Add proper mime-type in Apache web server configuration
AddType application/manifest+json webmanifest
@dr-dimitru
dr-dimitru / raw-count-usage.js
Created February 7, 2020 14:40
Efficient cursor count in Meteor.js
import { rawCount } from './raw-count.js';
rawCount(Meteor.users);
rawCount(Meteor.users, {'profile.active': true});
@dr-dimitru
dr-dimitru / mongodb.conf
Created February 7, 2020 14:50
MongoDB configuration we use on Meteor.js
# Our servers has 32GB of RAM
storage:
dbPath: /data/mongo
journal:
enabled: true
engine: wiredTiger
wiredTiger:
engineConfig:
cacheSizeGB: 8