Skip to content

Instantly share code, notes, and snippets.

View alexdevero's full-sized avatar
👨‍💻
Freelance TypeScript & React/Next.js developer available for work

Alex Devero alexdevero

👨‍💻
Freelance TypeScript & React/Next.js developer available for work
View GitHub Profile
@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 stuart11n/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 / 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],
@alexdevero
alexdevero / update-cygwin.md
Created June 10, 2018 08:03
Update Cygwin and its packages

Update Cygwin and its packages

Run following commands in CMD (as admin):

  • cd C:\cygwin or the name of the folder where you have Cygwin installed
  • wget -N https://cygwin.com/setup-x86_64.exe or download the file manually
  • setup-x86.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode (it is better to disable antivirus and firewall)
@alexdevero
alexdevero / darkreader-lighter-scrollbar
Created April 6, 2019 09:43
darkreader - make dark scrollbar on dark sites lighter
*
CSS
::-webkit-scrollbar {
background-color: #0d0d0d;
color: #afafaf;
width: auto;
height: auto;
}
/* foreground bar */