Skip to content

Instantly share code, notes, and snippets.

@buithaibinh
buithaibinh / download_play_list.txt
Last active December 5, 2024 09:34
Download 20 video with mp3 and concat them into one file
yt-dlp -x --audio-format mp3 --output "%(title).64s.%(ext)s" --restrict-filenames --max-downloads 20 "https://www.youtube.com/watch?v=qHYzG2WchIM&list=RDqHYzG2WchIM&start_radio=1&rv=qHYzG2WchIM"
ls *.mp3 | sed "s/^/file '/;s/$/'/" > file_list.txt
ffmpeg -f concat -safe 0 -i file_list.txt -c copy ../nhac_hai_ngoai.mp3
# Download mp3 file from 1 ulr
yt-dlp -x --audio-format mp3 -o "%(title)s.%(ext)s" "https://www.youtube.com/watch?v=vTkUlqFqWpc"
@buithaibinh
buithaibinh / instructions.md
Created January 9, 2024 07:19 — forked from msramalho/instructions.md
How to get a Facebook long term (non-expiring) access token for a Page
@buithaibinh
buithaibinh / wat.js
Created October 8, 2023 03:44 — forked from AVGP/wat.js
ffmpeg.js converting webm from a media recorder into mp4
var ffmpeg = require('ffmpeg.js/ffmpeg-mp4.js')
document.querySelector('button').addEventListener('click', (evt) => {
document.querySelector('[camera]').setAttribute('animation', {
property: 'rotation',
to: '0 360 0',
dur: 10000,
easing: 'linear'
})
@buithaibinh
buithaibinh / authorize.js
Created August 13, 2023 10:55 — forked from kndt84/authorize.js
Sample code: how to refresh session of Cognito User Pools with Node.js and Express
const AWS = require('aws-sdk');
const CognitoUserPool = require('amazon-cognito-identity-js-node').CognitoUserPool;
const CognitoUserSession = require('amazon-cognito-identity-js-node').CognitoUserSession;
const CognitoUser = require('amazon-cognito-identity-js-node').CognitoUser;
const CognitoIdToken = require('amazon-cognito-identity-js-node').CognitoIdToken;
const CognitoAccessToken = require('amazon-cognito-identity-js-node').CognitoAccessToken;
const CognitoRefreshToken = require('amazon-cognito-identity-js-node').CognitoRefreshToken;
const cfg = require('config').config;
const COGNITO_IDENTITY_POOL_ID = cfg.COGNITO_IDENTITY_POOL_ID;
@buithaibinh
buithaibinh / blocksToHtml.js
Created October 27, 2022 08:11 — forked from hagemann/blocksToHtml.js
Render EditorJS blocks to HTML.
const renderHtml = (blocks) => {
var html = blocks.map(block => {
switch (block.type) {
case 'code':
return `<pre><code>${ block.data.code }</pre></code>`
/**
* Original type is 'header' but I renamed the block to follow correct terminology:
* https://github.com/editor-js/header/issues/21
*/

Charity Finder

With the Charity Finder app you'll not only get to refine your Web Developer skills, but you will also have an opportunity to see how you can do good. The objective of this app is to utilize the Global Giving organizations API to provide your users with a list of global charities they can search to find a charity that matches their philanthropic interests.

Constraints

  • Since the app is asking the user to choose and contribute to a charitable cause it's important that the presentation of information be clear and concise. Just as important is the need for the UI/UX to be polished and engaging to use.
@buithaibinh
buithaibinh / Dockerfile
Created May 6, 2022 02:55
Base python3 alpine docker image with nodejs
FROM python:3.8-alpine
# install nodejs
RUN apk add --update nodejs npm
@buithaibinh
buithaibinh / Dockerfile
Created May 6, 2022 02:54
Base nodejs docker image with python3 based on alpine linux
FROM node:12-alpine
RUN apk add --no-cache python3 python3-dev \
linux-headers build-base bash git ca-certificates && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools==45 && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
rm -r /root/.cache
@buithaibinh
buithaibinh / index.html
Last active May 3, 2022 03:55
Vite + amplify UI + Quasar config
<!-- Vite requires, require for Amplify UI -->
<script>
window.global = window;
var exports = {};
</script>