Start of main content## Code Snippets

30 seconds of code provides a curated collection of short code snippets for all your development needs. Our collection spans many topics, ranging from simple coding problems to theoretical concepts and development techniques.

### Configure the git text editor

Git, Configuration

Configures the text editor used by git.

### Add files to the staging area

Git, Commit

Adds files to the staging area.

### Remove files from the staging area

Git, Commit

Removes files from the staging area.

### Factorial

Python, Math

Calculates the factorial of a number.

### Binomial coefficient

Python, Math

Calculates the number of ways to choose

`k`

items from`n`

items without repetition and without order.### Degrees to radians

Python, Math

Converts an angle from degrees to radians.

### Radians to degrees

Python, Math

Converts an angle from radians to degrees.

### Number to binary

Python, Math

Returns the binary representation of the given number.

### Number to hex

Python, Math

Returns the hexadecimal representation of the given number.