Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| <?php | |
| require dirname(__FILE__).'/wp-blog-header.php'; | |
| $wpdb->query("DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%')"); | |
| $wpdb->query("DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%'"); | |
| $wpdb->query("DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy)"); | |
| $wpdb->query("DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
| $wpdb->query("DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
| $wpdb->query("DELETE FROM wp_posts WHERE post_type IN ('product','product_variation')"); |
| #!/usr/bin/env swift | |
| // | |
| // PrintBootCampESDInfo.swift | |
| // | |
| // Created by nuomi1 on 8/5/18. | |
| // Copyright © 2018年 nuomi1. All rights reserved. | |
| // | |
| import Foundation |
| { | |
| "presets": ["es2015"], | |
| "plugins": ["transform-async-to-generator"] | |
| } |
| // SASS mixin duplicating rucksack's cool cool solution on creating responsive font sizes. | |
| // | |
| // The calculation is: | |
| // min-size + (min-size - max-size) * ( (100vw - min-width) / ( max-width - min-width) ) | |
| // | |
| @mixin font-responsive($fmin, $fdiff, $breakmin, $breakdiff) { | |
| font-size: calc( #{$fmin} + #{$fdiff} * ((100vw - #{$breakmin}) / #{$breakdiff}) ); | |
| @media(max-width: $breakmin) { | |
| font-size: $fmin; | |
| } |
| SPC s c remove highlight | |
| **** Files manipulations key bindings | |
| Files manipulation commands (start with ~f~): | |
| | Key Binding | Description | | |
| |-------------+----------------------------------------------------------------| | |
| | ~SPC f c~ | copy current file to a different location | | |
| | ~SPC f C d~ | convert file from unix to dos encoding | | |
| | ~SPC f C u~ | convert file from dos to unix encoding | |
| .cursor { | |
| cursor: url("cursor.png") 0 0, pointer; /* Legacy */ | |
| cursor: url("cursor.svg") 0 0, pointer; /* FF */ | |
| cursor: -webkit-image-set(url("cursor.png") 1x, url("cursor@2x.png") 2x) 0 0, pointer; /* Webkit */ | |
| } |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| const http = require('http'); | |
| const methods = [ 'get', 'put', 'post', 'delete', 'head' ]; | |
| const isStream = obj => | |
| obj && | |
| typeof obj === 'object' && | |
| typeof obj.pipe === 'function'; | |
| const isReadable = obj => |
| import React, { Component, } from 'react' | |
| import { | |
| View, | |
| Image, | |
| Text, | |
| Dimensions, | |
| ScrollView, | |
| } from 'react-native' | |
| const {height, width} = Dimensions.get('window') |