Skip to content

Instantly share code, notes, and snippets.

View jrmessias's full-sized avatar
:octocat:
[<(BR)>]

Júnior Messias jrmessias

:octocat:
[<(BR)>]
View GitHub Profile
@jrmessias
jrmessias / grok_to_pdf.md
Created March 26, 2025 03:01
Export Grok iA to PDF

To print a GROK chat, paste this code in javascript console:

(function() {
    var a = document.querySelector("body > div.flex > div").children[0].children[1].children[0];
    if (a) {
        const b = window.open("", "_blank", `width=${.85 * window.screen.width},height=${.85 * window.screen.height},left=${.075 * window.screen.width},top=${.045 * window.screen.height}`)
          , e = Array.from(document.styleSheets).map(c => {
            try {
                return Array.from(c.cssRules).map(d => d.cssText).join("\n")
            } catch (d) {
@jrmessias
jrmessias / string_to_color.js
Last active April 4, 2023 16:47
Function to convert string to color
var stringToColor = function(str) {
var hash = 0;
for (var i = 0; i < str.length; i++) {
hash = str.charCodeAt(i) + ((hash << 5) - hash);
}
var color = '#';
for (var i = 0; i < 3; i++) {
var value = (hash >> (i * 8)) & 0xFF;
color += ('00' + value.toString(16)).substr(-2);
}
@jrmessias
jrmessias / acrylic hosts.txt
Created February 17, 2023 19:26 — forked from aslamdoctor/acrylic hosts.txt
Acrylic Hosts File Configuration
Acrylic DNS Proxy (free, open source) does the job. It creates a proxy DNS server (on your own computer) with its own hosts file. The hosts file accepts wildcards.
Download from the offical website
http://mayakron.altervista.org/support/browse.php?path=Acrylic&name=Home
Configuring Acrylic DNS Proxy
To configure Acrylic DNS Proxy, install it from the above link then go to:
Start
@jrmessias
jrmessias / Update remote repo
Created June 26, 2021 21:26 — forked from mandiwise/Update remote repo
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@jrmessias
jrmessias / vscode-config
Created February 25, 2021 16:02
VS Code Config
-
@jrmessias
jrmessias / git-update-fork.sh
Created February 7, 2020 01:17 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream
@jrmessias
jrmessias / git-flow.md
Created October 18, 2019 17:21 — forked from seyhunak/git-flow.md
Git Flow - Cheatsheet

Git-Flow

Initialize a Repository for git-flow

git flow init -d

(Omit -d if you want to select values other than the defaults.)

Features

@jrmessias
jrmessias / GitCommitEmoji.md
Last active October 14, 2019 20:23 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji