Skip to content

Instantly share code, notes, and snippets.

@wellington1993
wellington1993 / Troubleshoot.jsm
Created January 11, 2020 00:17
resource://gre/modules/Troubleshoot.jsm
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["Troubleshoot"];
const { AddonManager } = ChromeUtils.import(
"resource://gre/modules/AddonManager.jsm"
);
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
@wellington1993
wellington1993 / aceleracao-de-hardware-de-video.md
Last active April 26, 2024 20:33
Aceleração de hardware de vídeo e placa de vídeo dedicada

A aceleração de hardware de vídeo pode trazer vários benefícios para o trabalho e o desempenho geral do computador, tais como:

  • Reduzir o tempo de compilação dos programas, tornando-os mais rápidos e eficientes. Uma placa de vídeo dedicada pode acelerar esse processo, usando a GPU para realizar cálculos paralelos e matriciais com mais rapidez do que a CPU . Isso pode ser útil para desenvolvedores que usam linguagens como C, C++, Delphi, Ruby, Python, entre outras, que precisam compilar seus códigos antes de executá-los.
  • Melhorar a qualidade e a fluidez da interface gráfica do sistema operacional, dos navegadores e dos softwares usados no trabalho, como editores, terminais, virtualizadores e outros. Uma placa de vídeo dedicada pode melhorar o desempenho gráfico desses elementos, usando a GPU para renderizar textos, imagens, vídeos e outros elementos na tela com mais precisão e suavidade . Isso pode ser útil para desenvolvedores que usam sistemas operacionais como Linux, Windows ou macOS, ou que usam navega
This file has been truncated, but you can view the full file.
/*! Copyright (c) 2020 WhatsApp Inc. All Rights Reserved. */
framework cocona commanddotnet commandline command-line-api CommandLineUtils CliFx
maintenance github contributors 4 4 78 75 92 14
releases 12 ? 17 3 45 17
.NET foundation project no no no yes no no
user acceptance github stars 366 223 2500 1800 1500 875
github used by 22 88 11900 ? 1900 51
.NET compatibility .NET Standard 2.0+ .NET Standard 2.0+ .NET Framework 4.0+/.NET Standard .NET Standard 2.0+ .NET Framework 4.5.1/.NET Standard 1.3 .NET Standard 2.0+/.NET Core 2.0+/.NET Framework 4.6.1+
F# support ? ? yes yes ? ?
multi-level command hierarchies yes
UNIX CLI style support yes yes yes
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://unpkg.com/topojson-client@3"></script>
<script src="https://d3js.org/d3.v5.min.js"></script>
<title>Document</title>
</head>
@fecony
fecony / README.md
Created January 7, 2022 23:29
Generate json data for Prisma countries, state and city seeding 🗄

// Countries, states, cities taken from https://github.com/dr5hn/countries-states-cities-database

// I had the idea of seeding the database with countries, states, and cities. // I tried to generate seed files with data from json files. I created data.json, copied in json of countries, and then used code.js file to parse data as I need.

// But after seeding, I realized that it didn't make sense. // And it's better to generate cities/countries/states as you go, as users add data for that particular location. // Cities SQL file takes 12,6 MB on disk // Just use SQL files...

@kflorence
kflorence / markdown-toc-tree.sh
Last active April 26, 2024 20:30
Creates a markdown table of contents from a file tree (omitting the directory itself, "readme.md" files and "images" folders and their contents)
#!/usr/bin/env bash
# This script generates markdown from the output of the `tree` command.
# See: https://linux.die.net/man/1/tree
# See: https://gist.github.com/kflorence/7f18ad97c65337ef77d37159260a331d
set -e
# Tree is configured with:
# - `-f`: use full paths in output (relative to directory given, in this case '.').
# - `--noreport`: exclude the directories and files report as the last line of output.
@skorytnicki
skorytnicki / sendmail.js
Last active April 26, 2024 20:30
EmailLabs Node.js integration
const request = require('request');
const smtp = '1.yoursmtp.smtp';
const appkey = 'yourappkey';
const secret = 'yoursecret';
const options = {
method: 'POST',
url: 'https://api.emaillabs.net.pl/api/new_sendmail',
form: {
d3 = function() {
var d3 = {
version: "3.2.7"
};
if (!Date.now) Date.now = function() {
return +new Date();
};
var d3_document = document, d3_documentElement = d3_document.documentElement, d3_window = window;
try {
d3_document.createElement("div").style.setProperty("opacity", 0, "");
@divamgupta
divamgupta / distilbert_tokenise.js
Created March 25, 2022 05:55
Simple one file tokeniser for DistilBERT in javascript
vocab_string = `[PAD]
[unused0]
[unused1]
[unused2]
[unused3]
[unused4]
[unused5]
[unused6]
[unused7]