Skip to content

Instantly share code, notes, and snippets.

View beardcoder's full-sized avatar
👾
Explore the universe

Markus beardcoder

👾
Explore the universe
View GitHub Profile
@beardcoder
beardcoder / MyComponent.vue
Last active February 9, 2022 08:58
Synced via Snip
<template>
</template>
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator';
@Component
export default class MyComponent extends Vue {
@Prop({ default: null }) items: string[];
# Screenshots
mkdir ~/Pictures/Screenshots/
defaults write com.apple.screencapture location ~/Pictures/Screenshots/
# Disable cloude Save
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
#Use current directory as default search scope in Finder
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
@beardcoder
beardcoder / encoding-video.md
Created April 16, 2019 14:36 — forked from Vestride/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@beardcoder
beardcoder / 01_before.js
Last active January 12, 2021 19:12
Mapping Pattern
export const useColorName = (color: string): any => {
const additionalColorClassNames = []
const additionalTextColorClassNames = []
switch (color) {
case 'primary':
additionalColorClassNames.push('bg-primary border-primary-light')
break
case 'secondary':
additionalColorClassNames.push('bg-secondary border-secondary-light')
break
@beardcoder
beardcoder / workspace.sh
Last active December 27, 2020 21:33
Allow switch window over all workspaces
gsettings set org.gnome.shell.window-switcher current-workspace-only false
gsettings set org.gnome.shell.app-switcher current-workspace-only false
@beardcoder
beardcoder / store.ts
Last active March 10, 2020 15:04
Store Pattern für vuex store
import { ActionTree, MutationTree } from '~/node_modules/vuex';
export const apiRoutes = {
requests: '/api/requests',
}
export interface RequestState {
requests: [] | null;
}
@beardcoder
beardcoder / auth.ts
Created July 19, 2019 08:22 — forked from AndreaMinato/auth.ts
Typescript Vuex Module
import axios, { AxiosRequestConfig } from "axios";
import router from "@/router"; //shortcut to src
import { Module } from "vuex";
const authModule: Module<any, any> = {
state: {
loggedIn: false,
loginError: null,
username: null
@beardcoder
beardcoder / apiDummy.js
Created July 17, 2019 07:30
Sample api file for js api calls
export default {
create(payload: any) {
},
show(id: number) {
},
index() {
},
@beardcoder
beardcoder / Docker-Proxy.nginx.conf
Created May 5, 2019 09:39
Docker Proxy settings for ISPconfig with nginx
location / {
proxy_pass http://localhost:2080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
access_log off;
log_not_found off;
@beardcoder
beardcoder / Prevent Focus style on mouse event.js
Last active April 3, 2019 12:28
This helper prevents the focus ring on mouse interaction for bootstap buttons
/**
* This helper prevents the focus ring on mouse interaction on buttons
*/
import forEach from 'lodash-es/forEach';
forEach(...[document.querySelectorAll('.btn')], (element) => {
let mouseDown = false;
element.addEventListener('mousedown', () => {