Skip to content

Instantly share code, notes, and snippets.

@Roger-Melo
Roger-Melo / reduce-scores-case-boilerplate.js
Last active April 8, 2024 23:15
Boilerplate para um caso de uso do reduce()
const phaseScores = [
{ name: 'Vinicius Costa', score: 337 },
{ name: 'Roger Melo', score: 43 },
{ name: 'Alfredo Braga', score: 234 },
{ name: 'Pedro H. Silva', score: 261 },
{ name: 'Ana Paula Rocha', score: 491 },
{ name: 'Vinicius Costa', score: 167 },
{ name: 'Roger Melo', score: 137 },
{ name: 'Alfredo Braga', score: 135 },
{ name: 'Ana Paula Rocha', score: 359 },
@Roger-Melo
Roger-Melo / filter-case-boilerplate.js
Created May 4, 2020 14:03
Boilerplate para um caso de uso do filter()
const users = [
{ name: 'Ada Lovelace', premium: true },
{ name: 'Grace Hopper', premium: false },
{ name: 'Alan Turing', premium: true },
{ name: 'Linus Torvalds', premium: false },
{ name: 'Margaret Hamilton', premium: true }
]
@Roger-Melo
Roger-Melo / map-case-boilerplate.js
Created May 3, 2020 20:58
Boilerplate para um caso de uso do map()
const products = [
{ name: 'Mouse Sem Fio', price: 30 },
{ name: 'Pen Drive', price: 25 },
{ name: 'Cartucho de Tinta', price: 50 },
{ name: 'Suporte Ergonômico para Notebook', price: 23 },
{ name: 'Repetidor de Sinal Wi-Fi', price: 44 }
]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>QR Codes</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="main.css">
<style>
img{
width: 100%;
@pasrom
pasrom / InkscapeConvert.bat
Last active November 6, 2020 13:50 — forked from JohannesDeml/README.md
Batch / bash converter for windows / mac / linux using inkscape and the command line
@Echo off
set "inkscapePath=C:\Program Files\Inkscape\inkscape.exe"
set /a count=0
set validInput1=svg
set validInput2=pdf
set validInput3=eps
set validOutput1=eps
set validOutput2=pdf
set validOutput3=png
@JohannesDeml
JohannesDeml / README.md
Last active November 28, 2025 09:43
Batch convert images with inkscape on windows

Batch convert svg|pdf|eps|emf|wmf|ai|ps|cdr to eps|pdf|png|jpg|tiff|svg|ps|emf|wmf

Screenshot Batch converter for Windows using Inkscape with the command line
InkscapeBatchConvert is an easy to use solution to quickly convert all files of a folder to another type without the need to open Inkscape. The program uses Windows Batch scripting and will only work on Windows.
Tested with Inkscape 1.0.x - 1.3.x ✅ (The last version that supports Inkscape 0.9.x can be found here)

Usage

  1. Download _InkscapeBatchConvert.bat
  2. Put it in the folder where you have files you wish to convert (will also scan on all subfolders for files of input type).
  3. Then double click the file to start it.
@HamousOnWheels
HamousOnWheels / reviveWacom.bat
Last active March 30, 2022 01:49
(BAT version) Reset crashed Wacom drivers
echo Reset crashed Wacom drivers and restore settings automatically (since they can get lost on stopping the service).
echo Tested with driver version 6.3.27-2. Run as admin. Restart your painting app after running the script.
cd %USERPROFILE%\Documents
"C:\Program Files\Tablet\Wacom\32\PrefUtil.exe" /backup WBackup.wacomprefs
net stop WTabletServicePro
net start WTabletServicePro
"C:\Program Files\Tablet\Wacom\32\PrefUtil.exe" /restore WBackup.wacomprefs
/*--------------Library code----------------*/
/**
* BezierEasing - use bezier curve for transition easing function
* by Gaëtan Renaudeau 2014 – MIT License
*
* Credits: is based on Firefox's nsSMILKeySpline.cpp
* Usage:
* var spline = BezierEasing(0.25, 0.1, 0.25, 1.0)
* spline(x) => returns the easing value | x must be in [0, 1] range
*
@unixpickle
unixpickle / main.go
Created January 5, 2017 02:49
RBF Network Diagrams
package main
import (
"image"
"image/color"
"image/png"
"math"
"os"
"strconv"
)
@nucular
nucular / fixwacom.bat
Created December 16, 2016 22:46
Batch file to fix your Wacom driver after it broke again
@echo off
:checkPrivileges
echo Checking for privileges
net file 1>nul 2>nul
if '%errorlevel%' == '0' (
goto gotPrivileges
) else (
echo Requesting privileges (script will execute in new window)
powershell "saps -filepath %0 -verb runas" >nul 2>&1