Move Git commits from master to a new branch
Did you accidentally commit to master
instead of a feature branch? Here's how you can move those commits to a new branch.
Finding ways to improve and optimize your code takes a lot of time, research and energy. Level up your coding skills one step at a time with this collection of quick tips and tricks.
Did you accidentally commit to master
instead of a feature branch? Here's how you can move those commits to a new branch.
Use special Unicode characters to print text in color in the console.
Calculate the number of days in a month for a given year using JavaScript.
Find the prime factors of a number using trial division in JavaScript.
Combining Math.random()
and a few simple math operations, you can generate an array of random integers in a specified range.
Use a simple JavaScript trick to validate a serialized JSON object.
Use a regular expression to remove HTML/XML tags from a string.
Check if an iterable is a superset of another one, excluding duplicate values.
Make sure to use the correct method when checking if a JavaScript object is an array.
Mutable default arguments can trip up Python beginners and veterans alike. Here's a quick workaround to deal with them.
Avoid unnecessary re-runs by using primitive dependencies in your React effect.
Have you ever made a commit only to realize that a file should not have been included? Let's see how you can fix this!
Ever wanted to convert a tilde path to an absolute path? Here's how you can do it in JavaScript.
Scroll listeners can easily become a performance bottleneck for your web application. Here's how to fix that.
Learn how to sort a Python dictionary list using a tuple key.
Quickly and easily determine if a given JavaScript Date
object is a weekday or weekend.
Iteration in JavaScript can be done a handfuld of ways, most often using array methods, but sometimes a for
loop is the best option.
Replace all characters in a string, except for the ending characters, with a mask character.
Learn how to create a promise that resolves after a given amount of time in JavaScript.
Increase your JavaScript code's performance when working with the DOM by leveraging this simple trick.
Have you ever tried to convert the string representation of a boolean to an actual boolean value? Here's a simple way to do it.
Using str.lstrip()
to strip a prefix from a string might not be exactly what you're looking for. Here's what you should use instead.
Learn how to use the cubic-bezier()
class of easing functions and create beautiful animations that stand out.
A short summary of your story up to 180 characters long.