Skip to content

Instantly share code, notes, and snippets.

View Shinigami92's full-sized avatar
🎯
Focused

Shinigami Shinigami92

🎯
Focused
View GitHub Profile
@Shinigami92
Shinigami92 / vue-crud-store-factory.ts
Created November 11, 2022 12:08
A CRUD Store Factory for Vue 3
import { useAsyncState } from "@vueuse/core";
import type { ComputedRef } from "vue";
import { computed, reactive, watch } from "vue";
export interface GetOptions {
/**
* @default false
*/
forceRefresh?: boolean;
}
@Shinigami92
Shinigami92 / bulk-delete-sentry-issues-with-condition.js
Created January 31, 2020 08:48
Bulk delete Sentry Issues with condition
const API_VERSION = 0;
const BASE_URL = `https://sentry.io/api/${API_VERSION}`;
const ORGANIZATION_SLUG = "";
const PROJECT_SLUG = "";
const TOKEN = ""; // 64 length hex, can be found in /settings/account/api/auth-tokens/
const CONDITION = "is:unresolved lastSeen:+52w";
const URL = `${BASE_URL}/projects/${ORGANIZATION_SLUG}/${PROJECT_SLUG}/issues/`;
const QUERY = escape(CONDITION);
const HEADERS = {
const fs = require('fs');
const path = require('path');
const prettier = require('prettier');
const { plugin } = require('./../dist/index');
const code = fs.readFileSync(path.resolve(__dirname, '../test/private/Settings/unformatted.pug'), 'utf8');
// test/private/Settings/unformatted.pug is a huge 1008 lines vue-pug file
let totalDuration = 0;
for (let iter = 1; iter <= 25; iter++) {
@Shinigami92
Shinigami92 / PS1_config.sh
Last active June 9, 2018 17:41
PS1 config
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}]:"
else
echo ""
fi