The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| import { GetServerSideProps } from 'next' | |
| import React from 'react' | |
| import Head from 'next/head' | |
| import Header from '../components/header' | |
| import Footer from '../components/footer' | |
| const Layout: React.FunctionComponent = () => ( | |
| <> | |
| <Head> | |
| <title></title> |
| Reduce( | |
| Lambda((acc, value) => | |
| Let( | |
| { | |
| count: Add(Select("count", acc), 1), | |
| update: Update(value, { data: { id: Var("count") } }) | |
| }, | |
| { | |
| count: Var("count") | |
| } |
| <?xml version="1.0"?> | |
| <ruleset name="WordPress Core"> | |
| <description>Non-controversial generally-agreed upon WordPress Coding Standards</description> | |
| <autoload>./../WordPress/PHPCSAliases.php</autoload> | |
| <!-- Treat all files as UTF-8. --> | |
| <config name="encoding" value="utf-8"/> | |
| <!-- Default tab width for indentation fixes and such. --> |
| const targets = ['[email protected]', '[email protected]'] | |
| const input = 'data/input.csv' | |
| const fs = require('fs') | |
| const csv = require('csv') | |
| const csvSync = require('csv-parse/lib/sync') | |
| const results = [] | |
| const data = fs.readFileSync(input) | |
| const res = csvSync(data) |
| <template> | |
| <picture | |
| v-if="devices === '3x'" | |
| :role="role" | |
| > | |
| <source | |
| v-for="(val, key, index) in sizes" | |
| :key="index" | |
| :media="`(min-width: ${val.media}em)`" | |
| :srcset="` |
| set displays to {} | |
| set newimage to "OS X:Library:Desktop Pictures:Beach.jpg" as alias | |
| tell application "System Events" | |
| set displays to a reference to every desktop | |
| repeat with i from 1 to count of displays | |
| set picture of item i of displays to newimage | |
| end repeat | |
| end tell |
| <?php | |
| $search_query = get_search_query(); | |
| $results = $wpdb->get_results("SELECT * | |
| FROM $wpdb->terms AS wt | |
| INNER JOIN $wpdb->term_taxonomy AS wtt ON wt.term_id=wtt.term_id | |
| INNER JOIN $wpdb->term_relationships AS wtr ON wtr.term_taxonomy_id=wtt.term_taxonomy_id | |
| LEFT JOIN $wpdb->posts wp ON wp.ID=wtr.object_id | |
| WHERE taxonomy='$taxonomy' AND name LIKE '%%$search_query%%' | |
| " ); |
| #!/bin/sh | |
| # Based on http://stackoverflow.com/questions/8371790/how-to-set-icon-on-file-or-directory-using-cli-on-os-x | |
| # Usage | |
| # cd path/to/moviesAndImagesDir/ | |
| # thisFileName.sh ./ [jpg|png] | |
| dirPath=$1 | |
| thumbExt=$2 | |
| IFS=$'\n' |