Skip to content

Instantly share code, notes, and snippets.

View gabrielboliveira's full-sized avatar

Gabriel Oliveira gabrielboliveira

  • somosyampi
  • Bauru, SP
View GitHub Profile
@gabrielboliveira
gabrielboliveira / edd-discount-codes.php
Created June 23, 2022 01:25
Generate random Coupon Codes for Easy Digital Downloads
<?php
$amountOfCoupons = 10;
$minLength = 8;
$maxLength = 14;
// From StackOverflow https://stackoverflow.com/a/13212994
function generateRandomString( $length = 10 ) {
$x = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@gabrielboliveira
gabrielboliveira / collapsible.md
Created June 9, 2022 13:52
Collapsible text in GitHub markdown

Collapsible text in GitHub markdown

A good suggestion to improve your texts in GitHub, either in Issues, PRs, README's or Wiki, is to use collapsible text. Example:

Expand me

https://c.tenor.com/AmA9IV_ssvIAAAAd/rick-rolled.gif

@gabrielboliveira
gabrielboliveira / claymore.js
Created July 29, 2017 23:48
Claymore Miner API example
const net = require('net')
let socket = new net.Socket()
const req = '{"id":0,"jsonrpc":"2.0","method":"miner_getstat1"}'
const ipAddress = '127.0.0.1'
const port = 3333
socket.setTimeout(1000)
socket.on('connect', () => {