This file contains 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
set nocompatible " Disable vi-compatibility | |
set t_Co=256 | |
colorscheme xoria256 | |
set guifont=menlo\ for\ powerline:h16 | |
set guioptions-=T " Removes top toolbar | |
set guioptions-=r " Removes right hand scroll bar | |
set go-=L " Removes left hand scroll bar | |
set linespace=15 |
This file contains 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
<x-layout> | |
<x-button class="bg-gray-400 hover:bg-gray-500" onclick="$modals.show('join-modal')">Join</x-button> | |
<x-modals.join /> | |
<script> | |
window.$modals = { | |
show(name) { | |
window.dispatchEvent( | |
new CustomEvent('modal', { detail: name }) |
This file contains 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 Assignment from "./Assignment.js"; | |
import AssignmentTags from "./AssignmentTags.js"; | |
import Panel from "./Panel.js"; | |
export default { | |
components: { Assignment, AssignmentTags, Panel }, | |
template: ` | |
<Panel v-show="assignments.length" class="w-60"> | |
<div class="flex justify-between items-start"> |
This file contains 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
[ | |
"United States" => "us", | |
"Afghanistan" => "af", | |
"Albania" => "al", | |
"Algeria" => "dz", | |
"American Samoa" => "as", | |
"Andorra" => "ad", | |
"Angola" => "ad", | |
"Anguilla" => "ai", | |
"Antarctica" => "aq", |
This file contains 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script> | |
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet"> | |
</head> | |
<body> |
This file contains 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Demo</title> | |
</head> | |
<body> | |
<h1> | |
<?php |
This file contains 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
<?php | |
// Connect to the MySQL database. | |
$dsn = "mysql:host=localhost;port=3306;dbname=myapp;user=root;charset=utf8mb4"; | |
// Tip: This should be wrapped in a try-catch. We'll learn how, soon. | |
$pdo = new PDO($dsn); | |
$statement = $pdo->prepare("select * from posts where id = 1"); | |
$statement->execute(); |
This file contains 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
<?php | |
/** | |
* Refactor #1: | |
*/ | |
// Before | |
if ($user->type === 'admin' || $user->type === 'mod' || $user->type === 'author') { | |
// Do something. | |
} |
This file contains 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 { defineStore } from "pinia"; | |
export let useTeamStore = defineStore('team', { | |
state: () => ({ | |
name: '', | |
spots: 0, | |
members: [] | |
}), | |
actions: { |
This file contains 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
<script setup> | |
defineProps({ | |
show: Boolean | |
}); | |
</script> | |
<template> | |
<div v-if="show" class="modal-mask"> | |
<div class="modal-container"> | |
<div> |