Skip to content

Instantly share code, notes, and snippets.

View MaurizioCasciano's full-sized avatar
👨‍💻
Turning Bits ON & OFF

Maurizio Casciano MaurizioCasciano

👨‍💻
Turning Bits ON & OFF
View GitHub Profile
@willccbb
willccbb / grpo_demo.py
Last active April 1, 2025 02:41
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
@ANRCorleone
ANRCorleone / readme.txt
Last active March 25, 2025 08:11 — forked from krisalyssa/readme.txt
Ubuntu 22.04 + Hyper V + Enhanced Session mode + XRDP PulseAudio
Credits
# https://c-nergy.be/blog/?p=13655
# https://askubuntu.com/questions/844245/how-to-compile-latest-pulseaudio-with-webrtc-in-ubuntu-16-04
# https://askubuntu.com/questions/496549/error-you-must-put-some-source-uris-in-your-sources-list
# https://unix.stackexchange.com/questions/65167/enable-udev-and-speex-support-for-pulseaudio
# https://rudd-o.com/linux-and-free-software/how-to-make-pulseaudio-run-once-at-boot-for-all-your-users
# https://gist.github.com/rkttu/35ecab5604c9ddc356b0af4644d5a226
# Installation and Enhanced session
# follow steps on the post below, I installed Ubuntu 22.04 on a Windows 11 machine
@javabrett
javabrett / Dockerfile
Created October 18, 2020 11:00
Build kafkacat on Centos 8
FROM centos:centos8.2.2004
RUN yum update -y && \
yum group install -y "Development Tools" && \
yum install -y git cyrus-sasl-devel cmake libcurl-devel
RUN git clone https://github.com/edenhill/kafkacat.git && \
cd kafkacat/ && \
./bootstrap.sh && \
./kafkacat -h
@markasoftware
markasoftware / enterprise_token.rb
Last active March 31, 2025 17:06
OpenProject Enterprise mode for free
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ it doesn't show that enterprise mode is enabled in the settings, but all ################
############ enterprise mode features, such as KanBan boards, are enabled. ################
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2023 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
@simonwep
simonwep / blockadblock-blocker.tapermonkey.js
Last active September 30, 2023 14:32
Blocks BlockAdBlock scripts
// ==UserScript==
// @name BlockAdblock Blocker
// @version 1.0
// @namespace http://tampermonkey.net/
// @description Blocks block-adblock
// @match *://**/*
// @grant none
// @run-at document-start
// ==/UserScript==
@abdallahokasha
abdallahokasha / Install Rails on Ubuntu.md
Last active November 12, 2022 20:47
How to install Rails and RVM on Ubuntu

Install rvm

sudo apt-get install software-properties-common

  1. Add the PPA and install the package

Open a terminal (Ctrl+Alt+T) and run:

sudo apt-add-repository -y ppa:rael-gc/rvm
@dogeared
dogeared / SpringBoot15Application.java
Last active July 7, 2020 09:33
spring boot 1.5.x with spring security 4 vs. spring boot 2.1.3 with spring security 5
@EnableOAuth2Sso
@RestController
@SpringBootApplication
public class OAuth2DemoApplication_1_5 {
@Value("#{ @environment['security.oauth2.resource.server'] }")
private String resourceServerUrl;
private OAuth2ProtectedResourceDetails resource;
@GhostofGoes
GhostofGoes / mac_addrs.py
Last active March 21, 2025 16:06
Get MAC addresses using a variety of Python packages.
# **************************************
# ** Get MAC address of a remote host **
def arpreq_ip(ip):
# type: (str) -> Optional[str]
import arpreq
return arpreq.arpreq('192.168.1.1')
def scapy_ip(ip):
# type: (str) -> str
"""Requires root permissions on POSIX platforms.
@bmaupin
bmaupin / open-source-sso.md
Last active March 23, 2025 17:36
Comparison of some open-source SSO implementations

ⓘ This list is not meant to be exhaustive and is not guaranteed to be maintained. See the comments for updates and alternative options.

(Items in bold indicate possible concerns)

Keycloak WSO2 Identity Server Gluu CAS OpenAM Shibboleth IdP
OpenID Connect/OAuth support yes yes yes yes yes yes
Multi-factor authentication yes yes yes yes yes yes
Admin UI yes yes yes yes yes no
OpenJDK support yes yes partial² yes
@briandominick
briandominick / asciidoc-static.adoc
Last active March 31, 2025 03:25
Static Site Generators with AsciiDoc Support

There are 28 static site generators that support AsciiDoc sourcing.