# create dir
mkdir my-python-version
cd my-python-version
# Init pipenv with the desired Python version
pipenv install --python 3.12
import { Worker } from 'worker_threads' | |
import path from 'path' | |
import Instance from '#models/Instance' | |
import app from '@adonisjs/core/services/app' | |
export class WhatsappManager { | |
isBooted = false | |
workers = new Map() | |
constructor() { |
-- Based off IETF draft, https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/ | |
create or replace function uuid_generate_v7() | |
returns uuid | |
as $$ | |
begin | |
-- use random v4 uuid as starting point (which has the same variant we need) | |
-- then overlay timestamp | |
-- then set version 7 by flipping the 2 and 1 bit in the version 4 string | |
return encode( |
import type { ApplicationService } from '@adonisjs/core/types' | |
export default class SocketProvider { | |
constructor(protected app: ApplicationService) {} | |
/** | |
* Register bindings to the container | |
*/ | |
register() {} |
import Application from '@ioc:Adonis/Core/Application' | |
import fs from 'fs' | |
import fsPromises from 'fs/promises' | |
import ffmpeg from 'fluent-ffmpeg' | |
export default class MultipartUploadService { | |
public stream: any = null | |
public file_name: string = '' | |
public chunk_index: number = 0 |
[ | |
{ | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |
After I have discovered the wonder called VS Code, I have been hooked to it. It's my goto editor for any project now. The convenience of having file browsing, editing with plethora of extensions, integrated terminal, and on top of that the existence of WSL means I do not need to switch Windows often. It takes the clutter out of my way.
However, this post is not about VS Code. It is about how to setup Android SDK on WSL, so that Android development can be done in a Linux system without actually having an access to one. And move the entire development work to VS Code instead of Android studio.
If you search on Google on how to achieve this, most likely this gist will be in top five results. It covers the most crucial points, but it is a little old by now.
<template> | |
<ReportWithHeader | |
:title="getSelectedPlayer ? getSelectedPlayer.name : ' '" | |
> | |
<div class="h-full w-full relative overflow-x-hidden rounded" id="swiper-section"> | |
<div class="w-full h-full absolute z-20 flex items-center justify-between"> | |
<button | |
@click="setPlayer('left')" | |
:disabled="selectedPlayerIndex == 0" | |
class="rounded-full bg-smoke flex items-center justify-center p-1 text-white"> |
<template> | |
<div class="flex justify-center w-full h-full p-3 rounded-b-lg"> | |
<div | |
class="flex flex-col items-center justify-center mx-2 cursor-move" | |
v-for="(option, index) in game.options" | |
:key="option.id" | |
draggable="true" | |
@dragstart="dragStart(index)" | |
@dragover="dragOver(index)" | |
@dragend="dragEnd" |
FROM node:13.7.0 | |
USER root | |
WORKDIR /app | |
COPY package*.json ./ | |
RUN npm install |