Skip to content

Instantly share code, notes, and snippets.

@reginadiana
reginadiana / README-TEMPLATE.md
Last active May 2, 2024 22:45
Template sugestivo para documentação de projetos

Titulo ou Arte do Projeto

@iamnewton
iamnewton / bash-colors.md
Last active May 2, 2024 22:42
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@Xunnamius
Xunnamius / no-msnbc-navbar.js
Created May 2, 2024 22:41
Regain control by popping the shaka player video element out of the Next.js app that MSNBC uses to stream their live content.
// ==UserScript==
// @name Remove the trash from MSNBC navbar
// @namespace http://tampermonkey.net/
// @version 2024-01-27
// @description try to take over the world!
// @author You
// @match https://*.msnbc.com/*
// @exclude https://*.msnbc.com/sigma.html*
// @noframes
// @icon https://www.google.com/s2/favicons?sz=64&domain=msnbc.com
@SuppieRK
SuppieRK / CaseMatcher.kt
Last active May 2, 2024 22:41
Regular expressions for case matching
/**
* Different case matchers
*
* @see <a href="https://en.wikipedia.org/wiki/Naming_convention_(programming)#Examples_of_multiple-word_identifier_formats">Examples of multiple word identifier formats</
*/
sealed class CaseMatcher(private val regex: Regex) {
open fun notMatches(source: String?): Boolean {
return !matches(source)
}
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375/
DOCKER_BUILDKIT: 1
build:
stage: build
services:
- name: docker:dind
command: ["dockerd", "--host=tcp://0.0.0.0:2375"]
@pLavrenov
pLavrenov / forge.sh
Created July 29, 2020 23:29
Laravel Forge Setup Script (July 2020) - NGINX + MySQL
# Replace!
# [!server!] (the forge server instance)
# [!sudo_password!] (random password for sudo)
# [!db_password!] (random password for database user)
# [!user.name!] (git user name)
# [!user.email!] (git user email)
# [!server_ip!] (git user email)
#
# REQUIRES:
@amfg
amfg / random.js
Created February 7, 2016 13:30
Generate random unicode string
random = function(length) {
var array = new Uint16Array(length);
window.crypto.getRandomValues(array);
var str = '';
for (var i = 0; i < array.length; i++) {
str += String.fromCharCode(array[i]);
};
return str;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Colorable Grid</title>
<style>
#grid-container {
margin: 0 0;
padding: 0 0;
@bilson
bilson / install-rtl-sdr-ubuntu.sh
Last active May 2, 2024 22:34
Install script for rtl-sdr for ubuntu
#!/bin/bash
cd ~
sudo apt-get update
sudo apt-get install curl git cmake libusb-1.0-0.dev build-essential
cat <<EOF >no-rtl.conf
blacklist dvb_core
blacklist dvb_usb_rtl28xxu