Skip to content

Instantly share code, notes, and snippets.

View Miuler's full-sized avatar
🦀
Mi nueva pacion, Rust!

Hector Miuler Malpica Gallegos Miuler

🦀
Mi nueva pacion, Rust!
View GitHub Profile
@Miuler
Miuler / pyproject.toml
Last active June 22, 2023 04:29
demo-poetry-pytest
[tool.poetry]
name = "test"
version = "1.0.0"
description = "test"
authors = ["Hector Miuler Malpica Gallegos <miuler@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.11"
[tool.poetry.group.test.dependencies]

Keybase proof

I hereby claim:

  • I am miuler on github.
  • I am miuler (https://keybase.io/miuler) on keybase.
  • I have a public key ASCpNMQJMmFzNgyHk37z9glcEHUL3mrvzSAKeeMzBig4Jgo

To claim this, I am signing this object:

@Miuler
Miuler / connect_bluetooth_headphones.sh
Created September 28, 2020 15:52 — forked from egelev/connect_bluetooth_headphones.sh
Connect bluetooth headphones on Ubuntu 18.04
#!/usr/bin/env bash
function get_headphones_index() {
echo $(pacmd list-cards | grep bluez_card -B1 | grep index | awk '{print $2}')
}
function get_headphones_mac_address() {
local temp=$(pacmd list-cards | grep bluez_card -C20 | grep 'device.string' | cut -d' ' -f 3)
temp="${temp%\"}"
temp="${temp#\"}"
@Miuler
Miuler / AndroidManifest.xml
Created May 11, 2018 15:46 — forked from bjoernQ/AndroidManifest.xml
Creating a System Overlay (Always on Top over all Apps) in Android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.mobilej.overlay"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="14" />
<application android:label="SystemOverlay" >
<activity
@Miuler
Miuler / sbt-plugin-ranking-2017-08-05.md
Created August 6, 2017 00:10 — forked from eed3si9n/ sbt-plugin-ranking-2017-08-05.md
List of sbt plugins sorted by GitHub stars. This was generated using https://gist.github.com/eed3si9n/ea4ceef0c5e5c07d6e62c87bea029f88, then augmented by hand.
// ==UserScript==
// @name Scroll Bar Hide
// @namespace https://miuler.com/
// @version 0.1
// @description Hide the scroll bar for sites.
// @author Miuler
// @match https://www.youtube.com/*
// @grant unsafeWindow
// @grant GM_registerMenuCommand
// @icon https://miro.medium.com/v2/resize:fill:48:48/1*6LVWTSSvxCYaftgZH-XFMQ.jpeg
const Gtk = imports.gi.Gtk;
const GLib = imports.gi.GLib;
// Initialize the gtk
Gtk.init(null, 0);
let mwindow = new Gtk.Window ({type : Gtk.WindowType.TOPLEVEL});
let label = new Gtk.Label ({label : "Hello World"});
// Set the window title
import scala.slick.jdbc.JdbcBackend.Database
import Database.dynamicSession
import scala.slick.jdbc.StaticQuery.interpolation
object Main extends App {
Database.forURL("jdbc:postgresql://localhost:5432/miuler", user = "miuler", password = "1234", driver="org.postgresql.Driver") withDynSession {
val result = sql"SELECT name, age FROM user LIMIT 10".as[(String, Int)]
println(result.list)
}
@Miuler
Miuler / prueba_clase_como_funcion.sc
Created April 27, 2014 06:41
Un scala workshet donde probé como una clase se puede usar como función en scala
import scala.util.matching.Regex.Match
val a = """Esto es un ejemplo de como ejemplo por que siempre ejemplo"""
val regex = "eje\\w*+" r
class Reemplazar[E](lista:List[E]) {
var i:Int = -1
def apply(replacer: Match) = {
@Miuler
Miuler / PruebaMutable.java
Created March 20, 2014 15:16
Probando la mutabilidad en un hashmap
package com.aep.billing.dao.dialect;
import static org.junit.Assert.assertEquals;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
/**