Skip to content

Instantly share code, notes, and snippets.

@joshuadavidnelson
joshuadavidnelson / example-output.html
Last active January 22, 2024 12:42
Using WordPress responsive images for css background-image property, in-line styling
<style>
.header {
background-image: url(http://local.dev/wp-content/uploads/2016/04/image-300x151.png)
}
@media only screen and (min-width: 300px) {.header {
background-image: url(http://local.dev/wp-content/uploads/2016/04/image-768x386.png)
}}
@media only screen and (min-width: 768px) {.header {
background-image: url(http://local.dev/wp-content/uploads/2016/04/image-1024x515.png)
}}
@shogito
shogito / 3dWrapper.js
Last active December 5, 2018 08:12
JavascriptからCSS3のmatrixをいじる用関数達
// random関数定義
var random = function(_num){
return Math.floor(Math.random() * _num);
}
// range関数定義
var range = function(_start, _end, _step){
if (arguments.length <= 1){
_end = _start || 0;
_start = 0;
@Abban
Abban / WordPress Theme Customizer Sample.php
Created June 21, 2012 21:09
WordPress Theme Customizer Sample
<?php
function themename_customize_register($wp_customize){
$wp_customize->add_section('themename_color_scheme', array(
'title' => __('Color Scheme', 'themename'),
'priority' => 120,
));
// =============================
@saetia
saetia / gist:1623487
Last active March 19, 2024 15:21
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat