Skip to content

Instantly share code, notes, and snippets.

View conradmuan's full-sized avatar
🙏
Trying my best!

Conrad Muan conradmuan

🙏
Trying my best!
View GitHub Profile
// ChatGPT wrote this as an example
// Function to check if a number is prime
function isPrime(number) {
if (number <= 1) {
return false;
} else if (number === 2) {
return true;
} else {
for (let i = 2; i <= Math.sqrt(number); i++) {
if (number % i === 0) {
// ChatGPT wrote this.
// I asked it to write a bunch of functions
// Function to calculate the square of a number
function square(x) {
return x * x;
}
// Function to check if a number is even or odd
function checkEvenOrOdd(num) {
@conradmuan
conradmuan / gitpurge.sh
Created June 9, 2016 16:04
delete local branches if their remote was deleted. Keep everything else
git branch --merged | grep -v "\*" | grep -Ev "(\*|master|develop)" | xargs -n 1 git branch -d
@conradmuan
conradmuan / .gitconfig
Last active June 9, 2016 16:01
gitconfig
[alias]
lasttag = for-each-ref refs/tags --format='%(refname:short)' --sort=-taggerdate --count 1
@conradmuan
conradmuan / package.json
Last active August 29, 2015 14:13
npm typical devDependencies
"devDependencies": {
"bootstrap": "^3.3.2",
"browser-sync": "^1.9.0",
"browserify": "^8.1.1",
"browserify-shim": "^3.8.2",
"gulp": "^3.8.10",
"gulp-rename": "^1.2.0",
"gulp-uglify": "^1.1.0",
"gulp-watch": "^3.0.0",
"jquery": "^2.1.3",