Now GitHub will only accept authentication with SSH and token only. Then, how to do it?
You need to change the git remote URL to:
git remote set-url <stream> https://<token>@github.com/<username>/<repository_name>
/** | |
How to add search query to url in JavaScript | |
By. Don Alfons Nisnoni <[email protected]> | |
**/ | |
function addSearchQuery(baseURL, searchQueryObj) { | |
const url = new URL(baseURL); | |
for (const key of Object.keys(searchQueryObj)) { |
/* | |
These media querie breakpoints is inspired from tailwind css | |
https://tailwindcss.com/docs/breakpoints | |
/* | |
/* 0px - 320px */ | |
/* extra small: 320px - 640px */ | |
@media (min-width: 320px) {} |
# Bulk rename files. | |
rename 's/\.txt$/.text/' *.txt | |
rename 's/\.old$/.new/' *.old |
const ejs = require('ejs') | |
const puppeteer = require('puppeteer') | |
const fs = require('fs') | |
const { Buffer } = require('buffer') | |
const { PDFDocument } = require('pdf-lib') | |
async function createPDF({ template, data, output, title = 'Laporan', format = 'A4' }) { | |
const content = ejs.render(fs.readFileSync(template).toString(), data) | |
const browser = await puppeteer.launch({ |
/** | |
How to capitalize string in V programming language | |
**/ | |
fn capitalize(str string) string { | |
mut words := str.split(' ') | |
for i, word in words { | |
if word.len == 0 { continue } |
// Map string values char by char to array of byte | |
'Hello'.bytes() | |
// Map string values char by char to array of string | |
'Hello'.bytes().map(it.str()) | |
// or | |
'Hello'.split('') |