Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Gitbook
// @match https://docs.openbrush.app/*
// @description Adds edit link to gitbook pages on https://docs.openbrush.app/
// @version 0.1
// @match https://www.tampermonkey.net/index.php?version=4.13.6136&ext=fire&updated=true
// @icon https://www.google.com/s2/favicons?domain=tampermonkey.net
// @grant none
// ==/UserScript==
@diegopacheco
diegopacheco / deploy-rpm-nexus.sh
Last active March 19, 2024 11:13
deploy-rpm-nexus.sh
#!/bin/bash
### Method 1
###
mvn deploy:deploy-file \
-DgroupId=com.github.diegopacheco.sandbox.devops \
-DartifactId=fpmtest \
-Dversion=1.0.0 \
-DgeneratePom=true \
-Dpackaging=rpm \
Rank Type Prefix/Suffix Length
1 Prefix my+ 2
2 Suffix +online 6
3 Prefix the+ 3
4 Suffix +web 3
5 Suffix +media 5
6 Prefix web+ 3
7 Suffix +world 5
8 Suffix +net 3
9 Prefix go+ 2
;; this function NEEDS `lexical-binding' set to `t'
(defun boox/attach-last-figure-adb (basename)
(interactive "sName: ")
(unless (eq major-mode 'org-mode)
(user-error "Not in an org buffer"))
(require 'org-attach)
(require 'org-download)
(let ((fp "/adb:8A3DF2BF:storage/self/primary/note/export/export.pdf"))
(when (file-readable-p fp)
@jgrossi
jgrossi / Car.php
Last active March 19, 2024 11:05
How to use Eloquent (from Laravel) inside Wordpress
<?php // File location: /wp-content/themes/my-theme/src/Models/
namespace App\Models;
use Illuminate\Database\Eloquent\Model as Eloquent;
class Car extends Eloquent
{
protected $table = 'cars';
protected $primaryId = 'id';
@zmanian
zmanian / keyping.go
Last active March 19, 2024 11:04
Key Pinning in #Golang
package main
import (
"bytes"
"crypto/sha256"
"crypto/tls"
"crypto/x509"
"log"
"net"
"net/http"
@tomasevich
tomasevich / nginx_nodejs.md
Last active March 19, 2024 11:04
Сервер в связке Nginx + NodeJs

Сервер в связке Nginx + NodeJs

Данная пошаговая инструкция поможет освоить основы на простом примере

Для справки

Сервер поднимался на Debian 8 c характеристиками:

CPU - 1 ядро x 500 МГц

@dalegaspi
dalegaspi / ConvertHttpMethodFilter.java
Created April 22, 2021 23:11
Custom Spring Cloud Gateway to change HTTP Method In Flight
package yeet;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.List;

An guide how to activate Windows 11 Pro for free

Why?

Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet

Am i also able to switch from any other edition to Pro?

The answer is yes! You can switch from almost any edition to Pro completely for free!

Note for users with unactivated Pro edition

People which already have Pro, but not activated, can skip to this step.

Getting started

What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:

@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active March 19, 2024 11:02
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH