Skip to content

Instantly share code, notes, and snippets.

View odarriba's full-sized avatar
🚀

Óscar de Arriba odarriba

🚀
View GitHub Profile
@sergey-cheperis
sergey-cheperis / proxmox7.1-ast25000-issue.md
Last active March 21, 2024 14:09
Resolve Proxmox 7.1 "installation aborted" on SuperMicro with AST 2500

Issue

On SuperMicro AS-4124GS-TNR server with ASPEED AST2500 BMC, Proxmox 7.1 installation does not start with "installation aborted" message.

Details

After setting up DHCP and Chrony, Proxmox fails to start the graphical installer and drops into the shell:

...
Starting Chrony for opportunistic time-sync... Starting a root shell on tty3.
brew tap homebrew/cask-fonts
brew install --cask font-cascadia-code
brew install --cask font-cascadia-code-pl
brew install --cask font-cascadia-mono
brew install --cask font-cascadia-mono-pl
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@heygambo
heygambo / lwp-cloudflare-dyndns.sh
Created March 17, 2020 05:21
Cloudflare as Dynamic DNS (revised)
#!/bin/bash
# Cloudflare as Dynamic DNS
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/
# Fixed and documented version by Christian Gambardella (https://gambo.io)
# 1. Create a cloudflare account
# 2. Create a zone and a record with any ip address.
# It will be updated by the script.
@csamsel
csamsel / h240.txt
Last active May 22, 2023 03:33
Switch HPE HBA H240 from raid mode to hba mode.
# So you want switch your HPE H240 controller to HBA mode for use with ESXi or UnRaid?
# online you'll find the follow command for HP controllers, like the P420i.
ssacli controller slot=0 modify hbamode=on
# For me, it was:
ssacli controller slot=255 modify raidmode=off
# while you are at it, you can also switch the power mode:
ssacli controller slot=255 modify powermode=minpower
@odarriba
odarriba / HowTo.md
Last active June 15, 2020 04:10
How to install ruby-opencv on OSX

First of all, install OpenCV v2:

$ brew install opencv@2

Then, set build configuration for build (changing OpenCVversion number for the current one):

$ bundle config build.ruby-opencv --with-opencv-lib=/usr/local/Cellar/opencv@2/2.4.13.6_2/lib \
@danielberkompas
danielberkompas / scheduler.ex
Created October 26, 2016 17:59
A simple mix task scheduler for Elixir apps
defmodule MyApp.Scheduler do
@moduledoc """
Schedules a Mix task to be run at a given interval in milliseconds.
## Options
- `:task`: The name of the Mix task to run.
- `:args`: A list of arguments to pass to the Mix task's `run/1` function.
- `:interval`: The time interval in millisconds to rerun the task.
@porras
porras / xargs.md
Last active August 31, 2021 14:54

This is my best try at transcribing of the lightning talk I gave at RUG::B on April 2016. Due to poor time management (LOL) the delivery was rushed and some examples were skipped, I hope having them posted here makes them more useful.

xargs

xargs is a small but very useful program that is installed in most if not all of your computers¹. Many of you probably know it. Those who don't will learn something really useful, but those who do will learn a couple of cool tricks, too.

Why xargs

You might have heard about the Unix philosophy:

require 'net/http'
require 'uri'
require 'json'
def open(url)
Net::HTTP.get(URI.parse(url))
end
page_content = open('http://www.loteriasyapuestas.es/servicios/premioDecimoProvisionalWeb')
res_json = JSON.parse(page_content)
@enoliglesias
enoliglesias / sermepa_signature_sha256_confirmation.rb
Last active November 25, 2016 17:35
Ds_Signature creation for Sermepa with SHA256
def confirmation(credentials)
return false if params['ds_signature'].blank?
# The DES3-CBC key generation it's the same that in the creation gist
# You can take a look at the explanation
secret_key = credentials[:secret_key]
secret_key_base64 = Base64.strict_decode64(secret_key)
des3 = OpenSSL::Cipher::Cipher.new('des-ede3-cbc')
block_length = 8
des3.padding = 0