Skip to content

Instantly share code, notes, and snippets.

View spiritbroski's full-sized avatar
🍞
bismillah

ꦫꦶꦤꦺꦴ spiritbroski

🍞
bismillah
View GitHub Profile
<template>
<Dashboard :login="login" />
</template>
<script lang="ts">
import Cookies from 'js-cookie'
import Dashboard from '@/components/Dashboard.vue'
import { Component, Vue } from 'nuxt-property-decorator'
@Component({
components: {
Dashboard,
<script lang="ts">
import { Component, Vue } from 'nuxt-property-decorator'
@Component
export default class MyStore extends Vue {
login_github(){
window.location.href="https://github.com/login/oauth/authorize?scope=repo&client_id="+process.env.github_client_id
}
}
</script>
"use strict";
const axios = require("axios");
const jwt = require("jsonwebtoken");
const formUrlEncoded = (x) =>
Object.keys(x).reduce((p, c) => p + `&${c}=${encodeURIComponent(x[c])}`, "");
const privateRepoRefresh = async function (params) {
const cloudant = require("@cloudant/cloudant")({
url: params.__bx_creds.cloudantnosqldb.url,
plugins: [
{ iamauth: { iamApiKey: params.__bx_creds.cloudantnosqldb.apikey } },
serverless deploy
version: "3"
services:
mongo:
image: mongo
container_name: mongodb
command: [--auth]
environment:
MONGO_INITDB_ROOT_USERNAME: poko
MONGO_INITDB_ROOT_PASSWORD: pokopin
cmd="ffmpeg -v debug -i 1.mp3 -i 2.mp3 -i 3.mp3 -i 4.mp3 -i 5.mp3 -i 6.mp3 -i 7.mp3 -filter_complex [0:0]concat=n=7:v=0:a=1[out] -map [out] final.mp3".split()
p = subprocess.Popen(cmd, stdin=subprocess.PIPE)
fout = p.stdin
fout.close()
p.wait()
print("merging audio done")
try {
await props.appwrite.account.create(
email,
password
);
props.setCurrentPage(props.currentPage)
} catch (err) {
setError(err.message)// error message always said the error code like "Unauthorized" for 401,"Too Many Request" for 429 abd so on
function selectImage(e) {
console.log("s")
listImages.forEach(a => {
a.color = "none";
})
listImages[e].color = "solid"
}
{listImages.length > 0 ? listImages.map((a, index) => {
a.color = "none"
return (
<div key={index} style={{ display: "inline-block", border: a.color, cursor: "pointer" }} onClick={() => selectImage(index)}>
{a.color}
<PreviewImage appwrite={props.appwrite} width={300} output={"webp"} id={a.$id} />
</div>
)
}) : ""}
@spiritbroski
spiritbroski / command.txt
Last active August 7, 2020 13:40
command to run python project
source env/bin/activate
sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt upgrade
sudo apt install gdal-bin libgdal-dev
pip3 install -r requirements.txt
python3 main.py
python3 main2.py