$ diskutil list
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 // Don't include this line | |
/** | |
* Add new font group (Custom) to the top of the list | |
*/ | |
add_filter( 'elementor/fonts/groups', function( $font_groups ) { | |
$new_font_group = array( 'custom' => __( 'Custom' ) ); | |
return array_merge( $new_font_group, $font_groups ); | |
} ); |
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
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
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
#!/bin/bash | |
# Chromium update script | |
# - by shad <shad@zaphod.eu> | |
# - by superbil <help@superbil.info> | |
OS=mac | |
SITE=http://build.chromium.org/buildbot/snapshots/chromium-rel- | |
LATEST=$(wget -q -O - ${SITE}${OS}/LATEST) | |
INSTALL_DIR=/Applications | |
TARGET=Chromium |
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 | |
/** | |
* Created by PhpStorm. | |
* User: dima | |
* Date: 11/12/16 | |
* Time: 11:58 AM | |
*/ | |
namespace Drupal\bootstrap_sass_helper; |
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
add_filter('woocommerce_billing_fields', 'custom_woocommerce_billing_fields'); | |
function custom_woocommerce_billing_fields( $fields ) { | |
$fields['billing_address_1']['class'] = array( 'form-group' ); | |
$fields['billing_address_1']['input_class'] = array( 'form-control' ); | |
return $fields; | |
} |
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
# Add correct content-type for fonts | |
AddType application/vnd.ms-fontobject .eot | |
AddType font/ttf .ttf | |
AddType font/otf .otf | |
AddType font/x-woff .woff | |
AddType image/svg+xml .svg | |
# Compress compressible fonts | |
AddOutputFilterByType DEFLATE font/ttf font/otf image/svg+xml |
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
$("form :input").each(function(index, elem) { | |
var eId = $(elem).attr("id"); | |
var label = null; | |
if (eId && (label = $(elem).parents("form").find("label[for="+eId+"]")).length == 1) { | |
$(elem).attr("placeholder", $(label).html()); | |
$(label).remove(); | |
} | |
}); |
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
Usage | |
----- | |
Place the 'themename_preprocess_html()' function in your theme's template.php file. | |
Rename 'themename' to your theme's actual name, | |
e.g. for 'bartik' the function name would be changed to 'bartik_preprocess_html'. | |
Change 'ui.slider' to whichever jQuery UI library you want to add. | |
In Drupal 7, jQuery UI library files are stored in '/misc/ui'. | |
See: http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_add_library/7 for reference. |
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
if ($request_uri = /) { | |
set $test A; | |
} | |
if ($host ~* teambox.com) { | |
set $test "${test}B"; | |
} | |
if ($http_cookie !~* "auth_token") { | |
set $test "${test}C"; |
NewerOlder