Skip to content

Instantly share code, notes, and snippets.

View IVainqueur's full-sized avatar
😮‍💨
getting too much sleep

ISHIMWE Vainqueur IVainqueur

😮‍💨
getting too much sleep
View GitHub Profile
@mugishap
mugishap / toPDF.ts
Created October 31, 2022 12:30
Simple function that transforms HTML to PDF.
import html2canvas from "html2canvas";
import jsPDF from "jspdf";
const exportPDF = () => {
const input = document.getElementById("documentID") as HTMLElement;
html2canvas(input, { logging: true, useCORS: true }).then((canvas) => {
const imgWidth = 290;
const imgHeight = 210;
const imgData = canvas.toDataURL("img/png"); transform canvas to an image
const pdf = new jsPDF("l", "mm", "a4"); // L is landscape, you can use whatever you want for example p to make it portrait
@sid24rane
sid24rane / udp.js
Created July 25, 2016 08:39
Simple UDP Client and Server in Node.js ==> ( Echo Server )
var udp = require('dgram');
// --------------------creating a udp server --------------------
// creating a udp server
var server = udp.createSocket('udp4');
// emits when any error occurs
server.on('error',function(error){
console.log('Error: ' + error);
@mxmerz
mxmerz / ANSI-Test.sh
Created November 2, 2015 16:29
Shell script to test support of ANSI color and style codes
# ANSI Start Codes
# Styles.
Normal="\x1b[0m"
Bold="\x1b[1m"
Faint="\x1b[2m"
Italic="\x1b[3m"
Underline="\x1b[4m"
Blink_Slow="\x1b[5m"
Blink_Rapid="\x1b[6m"
@julionc
julionc / 00.howto_install_phantomjs.md
Last active March 24, 2025 17:27
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev