Skip to content

Instantly share code, notes, and snippets.

View alexdevero's full-sized avatar
👨‍💻
The more I learn [about JS], the more there is to learn [about JS].

Alex Devero alexdevero

👨‍💻
The more I learn [about JS], the more there is to learn [about JS].
View GitHub Profile
@alexdevero
alexdevero / print-blinkist.js
Last active May 18, 2022 18:15
print-blinkist.js
/**
* Simple snippet for printing free book summaries on https://www.blinkist.com/nc/daily
* Open the book and use following code via browser console.
*/
$('.page main header, main .daily__top-menu, .reader__container > .reader__container__left, .reader__container__content .chapter.promotion, .reader__container__content .reader__container__buttons, .reader__container .reader__container__full__bottom_bar, .reader__container .reader__container__partial__bottom_bar').remove();
$('.reader__container__right .reader__container__content .chapter').css('display', 'block');
$('.chapter.supplement h1').css('margin-top', '0');
@alexdevero
alexdevero / BrowserDetect.js
Created May 13, 2017 11:21
Script for detecting browsers
const BrowserDetect = {
init: () => {
BrowserDetect.browser = BrowserDetect.searchString(BrowserDetect.dataBrowser) || 'Other';
BrowserDetect.version = BrowserDetect.searchVersion(navigator.userAgent) || BrowserDetect.searchVersion(navigator.appVersion) || 'Unknown';
},
searchString: (data) => {
for (let i = 0; i < data.length; i++) {
let dataString = data[i].string;
BrowserDetect.versionSearchString = data[i].subString;
@alexdevero
alexdevero / Readme.md
Created July 22, 2017 08:01 — forked from mxstbr/Readme.md
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
@alexdevero
alexdevero / gist:bf89343a13b9564f47c4a18cef05eb41
Created August 5, 2017 09:39 — forked from AliMD/gist:3344523
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨

@alexdevero
alexdevero / .gitignore
Created August 7, 2017 07:06
Default .gitignore for my project
# Development folders and files #
#################################
.tmp/
dist/
node_modules/
# Folder config file #
######################
Desktop.ini
@alexdevero
alexdevero / init-script.coffee
Created February 15, 2018 07:40
Atom - Unsubscribe from the gitrefresh event for every repo in the current project
(->
###*
# Unsubscribe from the gitrefresh event for every repo in the current project
# A fix for issue: https://github.com/atom/atom/issues/9544
###
disableGitRefreshOnFocus = ->
atom.project.repositories.forEach (repo) ->
if repo and repo.subscriptions and repo.subscriptions.disposables and repo.subscriptions.disposables.size
Array.from(repo.subscriptions.disposables).forEach (item) ->
@alexdevero
alexdevero / clear-cache.js
Created February 24, 2018 12:08 — forked from akashnimare/clear-cache.js
Clear cach in electron
const {BrowserWindow} = require('electron');
const win = BrowserWindow.getAllWindows()[0];
const ses = win.webContents.session;
ses.clearCache(() => {
alert("Cache cleared!");
});
@alexdevero
alexdevero / gist:8cc4e1384678aa4ddc490304c6ecb107
Created March 1, 2018 08:34 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@alexdevero
alexdevero / markdown.reg
Last active January 3, 2024 08:48
Add markdown as an item to “New” context menu in Windows 10 (https://superuser.com/questions/638755/add-item-to-new-context-menu-in-windows-8#640486).
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.md]
@="markdown"
[HKEY_CLASSES_ROOT\.md\ShellNew]
"NullFile"=""
[HKEY_CLASSES_ROOT\markdown]
@="Blank Markdown file"
@alexdevero
alexdevero / willSucceed.js
Created March 27, 2018 13:13
Will you succeed?
const willSucceed =() => {
const mindset = [
['ambition', true],
['confidence', true],
['courage', true],
['creativity', true],
['determination', true],
['discipline', true],
['grit', true],
['persistence', true],