Skip to content

Instantly share code, notes, and snippets.

View knynkwl's full-sized avatar
🦖

Kenyon Kowal knynkwl

🦖
View GitHub Profile
@knynkwl
knynkwl / app
Last active May 12, 2019 14:49
App Bundle with tailwind resolveConfig
View app
import '../css/app.css'
import resolveConfig from 'tailwindcss/resolveConfig'
import tailwindConfig from '../../tailwind.config.js'
const config = resolveConfig(tailwindConfig)
View react-form.json
{
"status": "enabled",
"uid": "9ca988ae-d632-49fd-b3f3-649cd2afcc0a",
"formHandle": "appForm",
"submitButton": "Submit Application",
"csrfTokenName": "CRAFT_CSRF_TOKEN",
"csrfToken": "w7yL0QZrrWZwrlDVqL7Mli33sOoYBfqI3ajRUZaXqTqO8ReAm8UYDMieWcWsVvZvAPj9kR-5QAuHu-k9T9zKG9EX1upNAHg7ttinXx7-boDUxhnDI4zUdArlhL0acloxNDfTkx5ddKqBx921XSjCe6dxgmSh1ci0wpz2AOITjx_fL0fLlaD2T7ulw-vA8G5T_RXPhysF5TvyRS2fPDTBwKKzcnZc4ulkKn2uWEAq2lIjf0qGRI1kbNLtJ7NIBhAycBr6emHr2K-f7hUk1B4xjJrq4eBLGcAgN-c_mMDLje95wP-vLWLPwOXk5TnV-Nt06Zpb9aKMXCG0rmj1yWDPXWSdy6EpgCVo5ojcCS3s_CvoIbOPfGJNXdXpxGYpyg2z5_Yg9RLpt0FugLTbKhRiCAZW5KR6ZEHL456L32xlsBbhNssL7L299bvIwU-nJugqlxcL__3jmT31wqintcknF9Bp_vsPN5wfw3YJyQ1MkbLxxRRGNYyzM0kpnxIFQ60WDUwHwQrYU1yY1RP2eW1IeApqtEhQrujLqt5iC-wtevk=",
"steps": [
{
"title": "Step 1",
@knynkwl
knynkwl / Craft-Calendar.twig
Last active July 13, 2016 04:23
Simple Craft Calendar
View Craft-Calendar.twig
{% set date = "now"|date("U") %}
{% set queryDate = craft.request.getQuery('date') ? craft.request.getQuery('date') : date|date('Y-n') %}
{% set nextMonth = queryDate|date_modify("+1 month")|date('Y-n') %}
{% set prevMonth = queryDate|date_modify("-1 month")|date('Y-n') %}
{% set days = ['Sun', 'Mon', 'Tue', 'Wen', 'Thu', 'Fri', 'Sat'] %}
{% set daysInMonth = date|date('t') %}
{% set startDow = date|date('F 1\\s\\t Y')|date('w') %}
{% set dow = startDow %}
@knynkwl
knynkwl / sectioned-results.twig
Created July 13, 2016 04:19
Craft Search Results : Ordered by Sections
View sectioned-results.twig
{% paginate results.limit(20).order('sectionId') as pageInfo, pageEntries %}
<ul class="search-results grid">
{% for section, entriesInGroup in pageEntries|group('section') %}
<div class="search-results__section">
<h3 class="search-results__section-title">{{section}}</h3>
{% for entry in entriesInGroup %}
{% include "search/_result-item" %}
{% endfor %}
</div>
View sql commands
[login to mysql]
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot
[show database]
show databases;
[create database]
CREATE DATABASE database_name;
[drop database]