Skip to content

Instantly share code, notes, and snippets.

View ryanjeric's full-sized avatar
🏆
Finished #100DaysOfCode 2020 challenge

Ryan jeric Sabado ryanjeric

🏆
Finished #100DaysOfCode 2020 challenge
View GitHub Profile
@ryanjeric
ryanjeric / snake&ladderNoBoard
Created May 10, 2020 11:26
Snake and ladder w/o Board - v1.0
import time
import random
print("Snake and ladder w/o Board - v1.0")
class Player:
def __init__(self, player_id):
self.score = 0
self.player_id = player_id
@ryanjeric
ryanjeric / digital_root.js
Last active February 8, 2020 17:47
Sum of Digits / Digital Root
// Sum of Digits / Digital Root
// In this kata, you must create a digital root function. A digital root is the recursive sum of all the digits in a number. Given n, take the sum of the digits of n. If that value has more than one digit, continue reducing in this way until a single-digit number is produced. This is only applicable to the natural numbers.
function digital_root(n) {
//return (n - 1) % 9 + 1;
var data = `${n}`.split("");
var total = 0;
do{
total = 0
if(data.length!=1){
for(var i=0;data.length>i;i++){
@ryanjeric
ryanjeric / apivs.sh
Created January 31, 2020 04:24
joona angdods
GREEN='\033[0;32m'
NC='\033[0m' # No Color
RED='\033[0;31m'
clear
printf "${GREEN}"
printf "===========================================\n"
printf "========== JavaScript Versioning ==========\n"
printf "========== Author: Jona ==========\n"
@ryanjeric
ryanjeric / ver.js
Created January 31, 2020 04:22
Joona nagbangsit
#!/bin/bash
# THIS IS FOR JAVASCRIPT VERSIONING
GREEN='\033[0;32m'
NC='\033[0m' # No Color
RED='\033[0;31m'
clear
printf "${GREEN}"
printf "===========================================\n"
This file has been truncated, but you can view the full file.
<table class='mbm mhc' border='0' cellpadding='0' cellspacing='0'><tr><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'></td><td height='4' width='4' bgcolor='##0#0#0'
@ryanjeric
ryanjeric / 0-array.js
Created July 14, 2018 05:29 — forked from mpj/0-array.js
Code to the video - "Map: Part 2 of Functional Programming in JavaScript"
var animals = [
{ name: 'Fluffykins', species: 'rabbit' },
{ name: 'Caro', species: 'dog' },
{ name: 'Hamilton', species: 'dog' },
{ name: 'Harold', species: 'fish' },
{ name: 'Ursula', species: 'cat' },
{ name: 'Jimmy', species: 'fish' }
]
@ryanjeric
ryanjeric / reducefunction.js
Created July 14, 2018 05:27
JS using Reduce Function
// https://jsfiddle.net/mattiasjle/w789neex/
var orders = [
{ amount: 250 },
{ amount: 400 },
{ amount: 100 },
{ amount: 325 }
]
var totalAmount = orders.reduce(function(sum, order) {
return sum + order.amount
@ryanjeric
ryanjeric / README.md
Created July 5, 2018 09:26 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@ryanjeric
ryanjeric / remote.sh
Created July 5, 2018 07:08
Bash ssh shortcut for linux
#!/bin/bash
#DO AFTER CREATE FILE : chmod +x remote.sh && sudo mv remote.sh /usr/bin/remote
PS3='Please select remote site '
options=("TEST SERVER" "Quit")
select opt in "${options[@]}"
do
case $opt in
"TEST SERVER")
ssh [email protected]
@ryanjeric
ryanjeric / funny.md
Created June 30, 2018 13:35 — forked from fguisso/funny.md
Funny initial commit messages

Funny initial commit messages

This is where it all begins...
Commit committed
Version control is awful
COMMIT ALL THE FILES!
The same thing we do every night, Pinky - try to take over the world!
Lock S-foils in attack position
This commit is a lie
I'll explain when you're older!