Skip to content

Instantly share code, notes, and snippets.

View roadev's full-sized avatar
🎯
Focusing

Juan Roa roadev

🎯
Focusing
View GitHub Profile
@digitalspaceport
digitalspaceport / gist:d8904efda4d5997a2f0e9caf31cff1c3
Last active June 24, 2021 20:45
1 liner to compile MadMax Chia plotter for Centos 7.
yum -y update
yum install vim -y
yum install htop -y
yum install git -y
yum -y install epel-release -y
yum install cmake3 gmp-devel libsodium gmp-static libsodium-static -y
yum -y install centos-release-scl -y
yum -y install cmake3 -y
sudo alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
@mrpeardotnet
mrpeardotnet / PVE-HP-ssacli-smart-storage-admin.md
Created November 25, 2019 22:10
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

@TRPB
TRPB / arch-macbook2018.md
Last active November 20, 2023 13:21
Guide: Running Arch on a 2018 MacBook Pro

Hardware Prerequisites

You'll need at least the following hardware:

  • At least 3 USB-A to USB-C converters or hub with enough ports for at least 3 USB devices if all your devices are USB-A then:
  • A USB drive
  • A USB keyboard
  • USB to Ethernet adapter, compatible USB dongle or USB tethering on a phone
@bradtraversy
bradtraversy / eslint_prettier_airbnb.md
Created July 19, 2019 17:54
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@richard-flosi
richard-flosi / star-wars-planets.html
Last active January 17, 2024 07:58
Web Component using Custom Element, Shadow DOM, fetch, async/await, and the Star Wars API
<html>
<head>
<script>
customElements.define("star-wars-planets", class extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: "open" });
}
static get observedAttributes() { return ["loading", "planets"]; }
@muZk
muZk / README.md
Created December 12, 2017 16:42
How to use hover with react-jss

How to use hover with react-jss

Let's say we have the following style:

const styles = (theme) => ({
  title: {
    color: theme.color,
  },
})
@alea12
alea12 / crontab
Created March 28, 2017 02:50
Nginx + Let's Encrypt + Rails5 + Puma
00 05 01 * * /home/alea12/letsencrypt/letsencrypt-auto certonly --webroot -w /var/www/html -d example.net --renew-by-default && nginx -t && nginx -s reload
require 'csv'
CSV.foreach('app/services/rg_list.csv', headers: true) do |row|
Person.find_or_create_by name: row['Name'].to_s.split.map(&:capitalize).join(' '), email: row['Email'].to_s.downcase, gender: row['Gender'].to_s.downcase
end
CSV.foreach('app/services/rg17_register_full.csv', headers: true) do |row|
Person.find_or_create_by name: row['Name'].to_s.split.map(&:capitalize).join(' '), email: row['Email'].to_s.downcase.strip, gender: row['Gender'].to_s.downcase, register_date: row['register_date'].to_s.downcase, birth_date: row['birth_date'].to_s, phone: row['phone'].to_s.downcase.strip, level: row['level'].to_s.downcase, motivation: row['motivation'].to_s.downcase, heard_ror: row['heard_ror'].to_s.downcase, laptop: row['laptop'].to_s.downcase, so: row['so'].to_s.downcase, expectation: row['expectation'].to_s.downcase, how_did_you_find_it: row['how_did_you_find_it'].to_s.downcase
end
@arteezy
arteezy / puma.service
Last active April 11, 2024 20:17
Manage Puma with systemd and rbenv
[Unit]
Description=Puma Rails Server
After=network.target
[Service]
Type=simple
User=deploy
WorkingDirectory=/home/deploy/app/current
ExecStart=/home/deploy/.rbenv/bin/rbenv exec bundle exec puma -C /home/deploy/app/shared/config/puma.rb
ExecStop=/home/deploy/.rbenv/bin/rbenv exec bundle exec pumactl -S /home/deploy/app/shared/tmp/pids/puma.state stop
<!-- in the header -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="scripts/jquery-2.1.1.min.js"><\/script>')</script>
<!-- document ready -->
<script>
$(document).ready(function() {
var customHTML = "<h2>Jeg elsker brød</h2>"