Skip to content

Instantly share code, notes, and snippets.

View ricardoalcocer's full-sized avatar
💭
making music at https://alcomusic.com

Alco ricardoalcocer

💭
making music at https://alcomusic.com
View GitHub Profile
@ricardoalcocer
ricardoalcocer / learning_guitar.md
Last active January 8, 2025 07:02
Learning Guitar

A Hacker's Guide to learning rhythm and lead guitar FAST!

I've been playing guitar for over 30 years. I never took formal lessons - only ocassional ones targeted to a specific topic. I love the discovery process and the relationship I've created with the instrument.

Five years ago or so, I had an a-ha moment, which fundamentaly changed the way I approach my learning of the guitar. After internalizing all the content I consumed, I thing I've come up with a formula for learning both rhythm and lead guitar in a very streamlined and systematic fashion. This method will teach you how to find chords across the entire fretboard so you can create chord progresssions for your own songs, or to make it easier to figure out the chords of your favorite songs.

However, what I like the most about it is that it gets you ready to play lead guitar, without putting too much emphasis on the pentatonic scale. Also, it teaches the guitar from the standpoint of understanding its symetry, and dare I say, the mathematics

@ricardoalcocer
ricardoalcocer / progression_generator.js
Last active January 2, 2025 06:30
Chord Progression Generator
// you can run this at https://jsbin.com/lohoval/7/edit?js,console
var progression = function(){
var currentKey = "";
var chords = {
"A" : ["A", "Bmin", "C#min", "D", "E", "F#min", "G#°"],
"B" : ["B", "C#min", "D#min", "E", "F", "G#min", "A#°"],
"C" : ["C", "Dmin", "Emin", "F", "G", "Amin", "B°"],
"D" : ["D", "Emin", "F#min", "G", "A", "Bmin", "C#°"],
"E" : ["E", "F#min", "G#min", "A", "B", "C#min", "D#°"],
@ricardoalcocer
ricardoalcocer / CountUpTimer.kt
Created May 13, 2020 04:36
Kotlin Android Countup
import android.os.CountDownTimer
abstract class CountUpTimer protected constructor(private val duration: Long) :
CountDownTimer(duration, INTERVAL_MS) {
abstract fun onTick(second: Int)
override fun onTick(msUntilFinished: Long) {
val second = ((duration - msUntilFinished) / 1000).toInt()
onTick(second)
}
@ricardoalcocer
ricardoalcocer / index.php
Created April 24, 2013 23:17
PHP Script to add P Tags to plain text documents
<html>
<head>
<title></title>
</head>
<body>
<h1>"P-Tag It!"</h1>
<?php
function addParagraphs($text){
// Add paragraph elements
function decodeEmojis(str){
var emoji = {":smile:":"\ud83d\ude04",":laughing:":"\ud83d\ude06",":blush:":"\ud83d\ude0a",":smiley:":"\ud83d\ude03",":relaxed:":"\u263a",":smirk:":"\ud83d\ude0f",":heart_eyes:":"\ud83d\ude0d",":kissing_heart:":"\ud83d\ude18",":kissing_closed_eyes:":"\ud83d\ude1a",":flushed:":"\ud83d\ude33",":relieved:":"\ud83d\ude25",":satisfied:":"\ud83d\ude0c",":grin:":"\ud83d\ude01",":wink:":"\ud83d\ude09",":stuck_out_tongue_winking_eye:":"\ud83d\ude1c",":stuck_out_tongue_closed_eyes:":"\ud83d\ude1d",":grinning:":"\ud83d\ude00",":kissing:":"\ud83d\ude17",":kissing_smiling_eyes:":"\ud83d\ude19",":stuck_out_tongue:":"\ud83d\ude1b",":sleeping:":"\ud83d\ude34",":worried:":"\ud83d\ude1f",":frowning:":"\ud83d\ude26",":anguished:":"\ud83d\ude27",":open_mouth:":"\ud83d\ude2e",":grimacing:":"\ud83d\ude2c",":confused:":"\ud83d\ude15",":hushed:":"\ud83d\ude2f",":expressionless:":"\ud83d\ude11",":unamused:":"\ud83d\ude12",":sweat_smile:":"\ud83d\ude05",":sweat:":"\ud83d\ude13",":weary:":"\ud83d\ude29",":
@ricardoalcocer
ricardoalcocer / english.txt
Created August 15, 2023 16:37
ChatGPT Professor Synapse Prompt
Act as Professor Synapse🧙🏾‍♂️, a conductor of expert agents. Your job is to support the user in accomplishing their goals by aligning with their goals and preference, then calling upon an expert agent perfectly suited to the task by initializing "Synapse_COR" = "${emoji}: I am an expert in ${role}. I know ${context}. I will reason step-by-step to determine the best course of action to achieve ${goal}. I can use ${tools} to help in this process
I will help you accomplish your goal by following these steps:
${reasoned steps}
My task ends when ${completion}.
${first step, question}."
Follow these steps:
<?php
// ini_set('display_errors', 1);
// ini_set('display_startup_errors', 1);
// error_reporting(E_ALL);
/**
* Alco Form Builder.
*
* Build a simple form based on a JSON file and store it as a K/V Store.
*
* @since 1.0.0
@ricardoalcocer
ricardoalcocer / create_subfolders.sh
Last active January 30, 2023 20:01
Creater Flutter Subfolders
#!/bin/sh
mkdir lib/data
mkdir lib/data/models
mkdir lib/data/dataproviders
mkdir lib/data/repositories
mkdir lib/business_logic
mkdir lib/business_logic/bloc
mkdir lib/business_logic/cubit
mkdir lib/presentation
@ricardoalcocer
ricardoalcocer / main.js
Last active January 4, 2023 15:58
Generate Musical Motif
function getMotifs(key, mode, motifLength, numMotifs) {
const modes = {
"ionian": [0, 2, 4, 5, 7, 9, 11],
"dorian": [0, 2, 3, 5, 7, 9, 10],
"phrygian": [0, 1, 3, 5, 7, 8, 10],
"lydian": [0, 2, 4, 6, 7, 9, 11],
"mixolydian": [0, 2, 4, 5, 7, 9, 10],
"aeolian": [0, 2, 3, 5, 7, 8, 10],
"locrian": [0, 1, 3, 5, 6, 8, 10]
};
@ricardoalcocer
ricardoalcocer / manifest.json
Created November 15, 2022 03:12
elmanifest
{
"created_by": "Michelle",
"splash": {
"thumbnails": {},
"_temp": false,
"_class": "Image",
"source": {}
},
"category_id": "tr",
"links_nested": [{