Skip to content

Instantly share code, notes, and snippets.

View CoffiDev's full-sized avatar
🏠
Working from home

Alejandro Cuenca Estrada CoffiDev

🏠
Working from home
View GitHub Profile
@thesved
thesved / roam-table-embed.css
Created June 5, 2020 22:56
Team Alignment Map in Roam Research
/* don't limit the block width for tables */
.rm-block-text {
max-width: none!important;
}
/* clean up tables embedded in tables and blocks within tables */
.roam-table, .roam-table th, .roam-table td, .roam-table tr {
padding:0!important;
vertical-align: top;
min-width:auto!important;
@chalsy87
chalsy87 / webPack-VSCode-Jest-alias-configuration.md
Created December 14, 2018 07:09
Use of alias in VSCode with Jest in a typeScript/JavaScript project

webPack-VSCode-Jest-alias-configuration

This are the necessary steps about How to configure alias in WebPack, VSCode and Jest.

Problem: We want to avoid the type of imports where you have to 'calculate' the path, intead of that we want to use a more friendly alias.

async function validatePassword(password: string): string[] {
let errors = []
// 1. Don't regex for things you can trivially express in code
// -----------------------------------------------------------
// For example, we could have written this as `/^.{0,7}$/` but that's not
// nearly as clear as checking the length of the string.
if (password.length < 8) {
errors.push("Password must be at least 8 characters long")
@getify
getify / monads-and-friends.md
Created July 16, 2020 19:38
Monads and Friends...

Monads and Friends...

Over the last 24-48 hours, I've fielded quite a flurry of tweets related to a couple of threads I posted recently. Upon reflection on the feedback, especially the negative stuff, I decided to write this blog post to clarify a few things about my background on the topic, what I was trying to say, what I've done so far, and what I'm hoping to do (and learn!) in the future.

It's a bit of a lengthy read, but if you find you've got the time, I hope you'll read it.

To be clear, the feedback has been on a broad spectrum. A lot of it was actually quite positive, people thanking me and appreciating my continued efforts to try to make dev topics approachable. As a matter of fact, over the years, I've received boat loads of such positive feedback, and I'm tremendously grateful that I've had a helpful impact on so many lives.

But some of it veered decidedly the other direction. I'm deliberately not linking to it, because I don't want to either amplify or gang up on those folks. I'm offended an

Frontend Masters: AWS for Frontend Engineers

You should have the following completed on your computer before the workshop:

  • Install the AWS CLI.
  • Have Node.js installed on your system. (Recommended: Use nvm.)
    • Install yarn with brew install yarn.
  • Create an AWS account. (This will require a valid credit card.)
  • Create a Travis CI account. (This should be as simple as logging in via GitHub).
[server]
SERVER
[server:vars]
server_name=SERVER
email=noc@gopractice.io
docker_nginx_ssl=true
@PCreations
PCreations / rxjs-diagrams.md
Last active January 18, 2024 08:52
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@Nuigurumi777
Nuigurumi777 / autolayer.py
Last active February 15, 2024 03:16
An example of sending layer changing commands from Windows host to Moonlander keyboard
import ctypes
import hid, sys
import time
user32 = ctypes.windll.user32
def get_active_language():
h_wnd = user32.GetForegroundWindow()
thread_id = user32.GetWindowThreadProcessId(h_wnd, 0)
klid = user32.GetKeyboardLayout(thread_id)
@jarretmoses
jarretmoses / React Native Clear Cache
Last active March 11, 2024 10:20
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@soheilhy
soheilhy / nginxproxy.md
Last active March 22, 2024 08:54
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers