- Open Help -> Toggle Developer Tools in the menu (Ctrl + Shift + I)
- Paste JavaScript code below into the Console and execute.
var styleNode = document.createElement('style'); styleNode.type = "text/css"; var styleText = document.createTextNode(` @font-face { font-family: "Fira Code";
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** Pre-compiled regex for stripping .md extension (case-insensitive) */ | |
| const MD_SUFFIX_REGEX = /\.md$/i | |
| /** | |
| * Server-side plugin that strips `.md` extensions from Vue Router params during SSR. | |
| * | |
| * When a request like `/public-page.md` is received, the Nitro layer sets | |
| * `event.context.markdownRequested` to signal markdown output preference. However, | |
| * Vue Router still sees the `.md` suffix in route params, which breaks data fetching |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| componentMeta: { | |
| globalsOnly: true, | |
| componentDirs: [ | |
| join(currentDir, './app/components/global'), | |
| ], | |
| exclude: [ | |
| '@nuxtjs/mdc', | |
| '@kong/kongponents', | |
| 'nuxt/dist', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <component | |
| :is="render" | |
| v-bind="attrs" | |
| :id="componentId" | |
| class="prose-svg" | |
| > | |
| <slot /> | |
| </component> | |
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .bgimage { | |
| width:100%; | |
| height:500px; | |
| background: url('https://images.unsplash.com/photo-1438109491414-7198515b166b?q=80&fm=jpg&s=cbdabf7a79c087a0b060670a6d79726c'); | |
| background-repeat: no-repeat; | |
| background-position: center; | |
| background-size:cover; | |
| background-attachment: fixed; | |
| } | |
| .bgimage h5 { |
Using a very simple sass function, and CSS animation keyframes, built parallax scrolling stars in space. The sass function creates a random star field on each load.
SASS function: https://coderwall.com/p/nqxusa by Kushagra Gour @chinchang457
Forked from Saransh Sinha's Pen Parallax Star background in CSS.
Utilizing Vite + Vue and Cypress Component Test Runner, how would you stub a composable function since you can't stub the default export?
I can't find a decent example that doesn't utilize Babel, and the only solution we have come up with is exporting an object with methods that can be stubbed, which, to be honest, would be a large refactor.
// Composable function
import { ref } from 'vue'
export default function useToggle (initialValue = false) {
const enabled = ref(initialValue)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "viewer": { | |
| "name": "Viewer", | |
| "description": "Read only access to all users", | |
| "entity_instances": [ | |
| { | |
| "id": "UUID-A" | |
| }, | |
| { | |
| "id": "UUID-B" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| mapfile -t words < <(grep -x '[a-z]\{5\}' "${WORDLIST:-/usr/share/dict/words}") | |
| word=${words[RANDOM % ${#words[@]}]} pool=abcdefghijklmnopqrstuvwxyz | |
| for ((round=1; round <= ${ROUNDS:=6}; round++)); do | |
| while chars="" && read -rp "$round/$ROUNDS: " guess || exit 1; do | |
| case " ${words[@]} " in *" ${guess,,} "*) guess=${guess,,}; break; esac | |
| done; for ((i=0; i < ${#word}; i++)); do | |
| [[ ${word:i:1} != ${guess:i:1} ]] && chars+=${word:i:1} | |
| done; i=0; while char=${guess:i:1} && ((i < ${#guess})) ; do | |
| { [[ ${word:i++:1} == $char ]] && color=2; } || |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Login from 'Login.vue' | |
| import win from 'window.ts' | |
| it('pre-populates the email input from search params', () => { | |
| // Stub search params | |
| cy.stub(win, 'getLocationSearch').returns(`?email=${encodeURIComponent(user.email)}`) | |
| mount(Login) | |
| // Email input should be pre-populated |
NewerOlder