Skip to content

Instantly share code, notes, and snippets.

View yuki's full-sized avatar

Rubén Gómez Olivencia yuki

View GitHub Profile
@yuki
yuki / music2.ly
Created March 25, 2025 18:22
Piano music score for lilypond
\header {
title = "A thousand miles"
composer = "Vanessa Carlton"
}
criffa = {
b'16 b, b' ais b, ais' fis8~ fis4 dis8 cis16 b
}
criffb = {
@yuki
yuki / music.ly
Created March 25, 2025 12:59
Music score for lilypond
\header {
title = "I'll always be right there"
composer = "Bryan Adams"
}
achord =
#(define-music-function (parser location duration) (ly:duration?)
#{ <a, e a cis' e'> $duration #})
emixarpegio = {<gis b>8 e' b gis}
@yuki
yuki / server.py
Created October 17, 2022 17:46 — forked from faelp22/server.py
Python3 SimpleHTTPServer for Static Serving (VueJS/ React / Angular / Ember) in HTML5 mode (a la mod_rewrite)
#!/usr/bin/env python
'''
Based on https://gist.github.com/chrisbolin/2e90bc492270802d00a6
'''
import os
from http.server import HTTPServer, SimpleHTTPRequestHandler
from urllib.parse import urlparse
@yuki
yuki / download.js
Last active June 1, 2022 06:48
Download any Bb Collaborate Recording
// from https://www.reddit.com/r/UofT/comments/jfewc9/trick_i_found_to_download_any_bb_collaborate/
// In the Console tab, paste in the following:
document.getElementsByClassName("vjs-tech")[0].src
@yuki
yuki / compose.yaml
Created May 10, 2022 16:39
Docker compose for PostgreSQL13 + PostgreSQL14 + Adminer + PGAdmin4
services:
postgres13:
image: postgres:13
restart: always
environment:
POSTGRES_PASSWORD: example
ports:
- 5432:5432
@yuki
yuki / compose.yaml
Last active May 30, 2022 19:02
MySQL compose file with Adminer and PHPMyADmin
# mkdir mysql_data
# docker-compose up
# a simple docker-compose for MySQL
services:
mysql8:
image: mysql:8.0.28
command: --default-authentication-plugin=mysql_native_password
restart: always
ports:
@yuki
yuki / deferred-examples.js
Created October 24, 2017 19:16
Two examples of Jquery with promises
//to use this example create 3 files named 5.php, 1.php and 8.php, and in each make a "sleep" for the number of seconds
// ----------
// EXAMPLE 1
// in this example the objects are getted all at the same time.
// ----------
var a = ["5.php","1.php","8.php"]
var promises = [];
a.forEach(function(page) {
@yuki
yuki / mysql_size
Created December 4, 2012 09:24
Get Mysql tables size
-- http://www.mysqlperformanceblog.com/2008/02/04/finding-out-largest-tables-on-mysql-server/
SELECT CONCAT(table_schema, '.', table_name),
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows,
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA,
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx,
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
ROUND(index_length / data_length, 2) idxfrac
FROM information_schema.TABLES
ORDER BY data_length + index_length DESC
LIMIT 10;
# Prefer an audible bell to the visual one.
vbell off
# Skip the startup message
startup_message off
# Display a caption string below, appearing like tabs and
# displaying the window number and application name (by default).
caption always
caption string "%{kw}%-w%{wr}%n %t%{-}%+w"