Skip to content

Instantly share code, notes, and snippets.

View robertohuertasm's full-sized avatar
🦀
friendly rustacean

Roberto Huertas robertohuertasm

🦀
friendly rustacean
View GitHub Profile
@robertohuertasm
robertohuertasm / .licrc
Last active April 9, 2024 15:59
Simple .licrc config file for Licensebat
# IMPORTANT!: ALL SECTIONS ARE MANDATORY
[licenses]
# This indicates which are the only licenses that Licensebat will accept.
# The rest will be flagged as not allowed.
accepted = ["MIT", "MSC", "BSD"]
# This will indicate which licenses are not accepted.
# The rest will be accepted, except for the unknown licenses or dependencies without licenses.
# unaccepted = ["LGPL"]
# Note that only one of the previous options can be enabled at once.
# If both of them are informed, only accepted will be considered.
@robertohuertasm
robertohuertasm / prerequisites.md
Last active July 1, 2023 14:14
Prerequisites

Prerequisites

In order to start the workshop there are a few things that we will have to install or set up.

Rust

If you don't have Rust installed in your machine yet, please follow these instructions.

Visual Studio Code

@robertohuertasm
robertohuertasm / datadog-ai.user.js
Last active June 23, 2023 12:54
Datadog Error Tracking AI
// ==UserScript==
// @name Datadog - Error Tracking AI
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Roberto Huertas
// @match https://dd.datad0g.com/apm/error-tracking?*
// @icon https://www.google.com/s2/favicons?sz=64&domain=datad0g.com
// @grant none
// ==/UserScript==
- name: Dump GitHub context
id: github_context_step
run: echo '${{ toJSON(github.event) }}'
<script>
import { signOut as authSignOut } from 'sk-auth/client';
import { session } from '$app/stores';
// getting the user from the session store
$: user = $session.user;
function signIn() {
location.assign('/api/auth/signin/cognito?redirect=/');
}
@robertohuertasm
robertohuertasm / pin.rs
Created February 6, 2022 22:42
Playing with Pin
use pin_project::pin_project;
use std::future::Future;
use std::pin::Pin;
use std::task;
use std::time::Duration;
use tokio::time::Instant;
#[tokio::main(flavor = "multi_thread", worker_threads = 1)]
async fn main() {
let async_fn = reqwest::get("http://robertohuertas.com");
@robertohuertasm
robertohuertasm / EndlessService.kt
Last active December 25, 2021 09:21
foreground_services
class EndlessService : Service() {
private var wakeLock: PowerManager.WakeLock? = null
private var isServiceStarted = false
override fun onBind(intent: Intent): IBinder? {
log("Some component want to bind with the service")
// We don't provide binding, so return null
return null
}

Keybase proof

I hereby claim:

  • I am robertohuertasm on github.
  • I am robertohuertasm (https://keybase.io/robertohuertasm) on keybase.
  • I have a public key ASDpvIt8m-C06M2ZPwPtlAKy4nfh9ddOS3hb4FFPiVgHGQo

To claim this, I am signing this object:

import { appAuth } from '$lib/auth';
export const { getSession } = appAuth;
// we're importing our auth object here
import { appAuth } from '$lib/auth';
// and exposing the get and post method handlers
export const { get, post } = appAuth;