Skip to content

Instantly share code, notes, and snippets.

View utsukushiihime's full-sized avatar
🎯
Focusing

Crystal McNeil utsukushiihime

🎯
Focusing
View GitHub Profile
@utsukushiihime
utsukushiihime / .js
Created December 12, 2020 06:42
powerOfTwo JavaScript
const powerOfTwo = (num) => {
let pot = Math.pow(2, Math.ceil(Math.log2(num))) - num;
if (pot === 0) {
return "true";
} else {
return "false";
}
};
@utsukushiihime
utsukushiihime / .js
Last active December 12, 2020 06:44
toSnakeCase JavaScript
function SnakeCase(str) {
const regex = /\W+/g;
for (char in str) {
let newStr = str.toLowerCase().replace(regex, "_");
return newStr;
}
}
console.log(SnakeCase("This*is a Great-Night"));
@yshmarov
yshmarov / 0 AWS Cloud9
Last active October 19, 2024 12:55
Ruby on Rails 6: Learn 25+ gems and build a Startup MVP 2020
# All AWS C9 envments
https://eu-central-1.console.aws.amazon.com/cloud9/home?region=us-east-1
# Instance management
https://console.aws.amazon.com/ec2/home?region=eu-central-1#Instances:sort=instanceId
# Create AWS C9 environment
https://eu-central-1.console.aws.amazon.com/cloud9/home/create
Setting - set tabs to 2