This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { build, preview } from "vite"; | |
import { chromium } from "playwright"; | |
async function generatePdf(url) { | |
const browser = await chromium.launch(); | |
const page = await browser.newPage(); | |
await page.goto(url); | |
await page.pdf({ path: `cv-${Date.now()}.pdf`, printBackground: true }); | |
await browser.close(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as sql from 'node-sql-parser' | |
const dummy_sql = | |
[ | |
'SELECT cast(testcol as integer) FROM GAMIESAi', | |
'SELECT cast(testcol as integer) FROM GAMIESAi', | |
'SELECT cast(testcol as integer) FROM GAMIESAi', | |
'SELECT cast(testcol as integer) FROM GAMIESAi', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://observablehq.com/@scarysize/finding-random-points-in-a-polygon | |
const pointsOutput = | |
` | |
{ Vec2(191.36773681641, -896.60498046875), Vec2(455.9482421875, -696.60577392578), Vec2(584.68591308594, -1235.2385253906), Vec2(-316.11657714844, -1357.7646484375), Vec2(-316.51806640625, -815.22882080078), Vec2(-179.95001220703, -968.591796875), } | |
` | |
const earcut = require('earcut') | |
/* https://en.wikipedia.org/wiki/Shoelace_formula */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- author: Nikos Kapraras | |
-- email: [email protected] | |
-- TimerClass | |
local TimersClass = class('TimersClass') | |
function TimersClass:__init() | |
self.lastId = 1 | |
self.activeTimers = 0 | |
self.timers = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local winMusic = nil | |
Events:Subscribe('Level:Loaded', function(levelName, gameMode) | |
local winSoundAsset = ResourceManager:SearchForDataContainer('Sound/Music/MP_Music/MP_Music_Winning_Patch_01') | |
if winSoundAsset ~= nil then | |
local entityPos = LinearTransform() | |
entityPos.trans = Vec3(0.0, 0.0, 0.0) | |
print(entityPos) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Drawing.Printing; | |
using System.Drawing; | |
namespace ConsoleApp1 | |
{ | |
class Program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
const fs = require('fs') | |
const util = require('util') | |
const fsMkdir = util.promisify(fs.mkdir) | |
const fsExists = util.promisify(fs.exists) | |
/** | |
* | |
* @param {string} dirpath |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function printf() { | |
const args = Array.from(arguments) | |
let str = args.shift() | |
return args.reduce((str, val, i) => { | |
let reg = new RegExp(`\\{${i}\\}`, 'g') | |
return str.replace(reg, val) | |
}, str) | |
} |