Skip to content

Instantly share code, notes, and snippets.

@cesasol
cesasol / pnpm-install
Created October 10, 2018 23:13
pnpm install solver
#!/bin/sh
# This is a simple hack to fix the pnpm module resolution, if you encounter "Module not found" in some deep dependency of your
# project, then use this script to add those not founded dependencies as a direct dev dependency.
# All credit goes to flaviut https://github.com/pnpm/pnpm/issues/1261
while true; do pnpm install -D $(pnpm start 2>&1 | grep 'Error: Cannot find module' | sed "s/Error: Cannot find module '\([a-z.-]\+\)'/\1/g"); done
@Pulimet
Pulimet / AdbCommands
Last active September 20, 2024 06:31
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.
@indiesquidge
indiesquidge / objects-over-classes.md
Last active January 17, 2024 09:30
We are better off avoiding ES6 classes in JavaScript when possible

Plain JavaScript objects are better than classes when they can be used, and many popular modern frameworks have adopted their use.

Consider that in React a component can be created as either a class or as an object.

// using a class
class Welcome extends React.Component {
  render() {
 Hello, {this.props.name}
@AlexVKO
AlexVKO / passwords_controller.rb
Created November 3, 2015 05:15
Allow devise to reset password signed in
class PasswordsController < Devise::PasswordsController
# here we need to skip the automatic authentication based on current session for the following two actions
# edit: shows the reset password form. need to skip, otherwise it will go directly to root
# update: updates the password, need to skip otherwise it won't even reset if already logged in
skip_before_filter :require_no_authentication, :only => [:edit, :update]
# we need to override the update, too.
# After a password is reset, all outstanding sessions are gone.
# When already logged in, sign_in is a no op, so the session will expire, too.
# The solution is to logout and then re-login which will make the session right.
= Arch Linux step-by-step installation =
= http://blog.fabio.mancinelli.me/2012/12/28/Arch_Linux_on_BTRFS.html =
== Boot the installation CD ==
== Create partition ==
cfdisk /dev/sda
* Create a partition with code 8300 (Linux)
@staltz
staltz / introrx.md
Last active September 20, 2024 10:10
The introduction to Reactive Programming you've been missing
@zachstronaut
zachstronaut / gist:1184900
Created August 31, 2011 22:22
Stretch HTML5 canvas to fill window, preserving aspect ratio
/**
* fullscreenify()
* Stretch canvas to size of window.
*
* Zachary Johnson
* http://www.zachstronaut.com/
*
* See also: https://gist.github.com/1178522
*/