Skip to content

Instantly share code, notes, and snippets.

<script setup>
import { ref, onMounted } from 'vue'
export const player = ref(null)
const createPlayer = () => {
player.value = new YT.Player('player', {
width: '560',
height: '349',
videoId: 'ScMzIvxBSi4'
})
knex.addHook('after', 'insert', 'follows', async (when, method, table, params) => {
try {
const { follower_id, follow_id, id } = params.result[0]
const follower = client.feed('timeline', follower_id)
await follower.follow('user', follow_id)
const activity = {
actor: `users:${follower_id}`,
verb: 'follow',
devServer: {
proxy: {
'/socket.io': {
target: 'http://localhost:3001',
ws: true
},
'/api': {
target: 'http://localhost:3001',
changeOrigin: true
}
export const setSessionIdToken = (token) =>
sessionStorage.setItem('id_token', token)
export const setLocalIdToken = (token) =>
localStorage.setItem('id_token', token)
export const getIdToken = () =>
sessionStorage.getItem('id_token') || localStorage.getItem('id_token')
export const requireAuth = (nextState, replaceState) => {
export const getCurrentUser = () => (dispatch, getState) => {
const { currentUser } = getState().authenticationRequest
if (currentUser) {
return dispatch({
type: 'CURRENT_USER_SUCCESS',
currentUser
})
}
dispatch({
import axios from 'axios'
import {
init,
captureMessage,
Transports
} from '@sentry/browser'
class AxiosTransport extends Transports.BaseTransport {
async sendEvent(event) {
await axios.post(this.url, event)
devServer: {
proxy: {
'/socket.io': {
target: 'http://localhost:3001',
ws: true
},
'/api': {
target: 'http://localhost:3001',
changeOrigin: true
}
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
#
# | |_ _ __ ___ _ ___ __ #
# | __| '_ ` _ \| | | \ \/ / #
# | |_| | | | | | |_| |> < #
# \__|_| |_| |_|\__,_/_/\_\ #
# 1 0 | VIM | 2:bash 20:04
# [ Reset Prefix ] {{{1
set -g prefix C-a
bind-key a send-prefix # for nested tmux sessions
[bar/i3wmthemer_bar]
width = 100%
height = 27
radius = 0
fixed-center = true
monitor = HDMI-1-1
monitor-fallback = eDP-1-1
background = #0D0208
foreground = #00FF41