Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
– The Git website
Choose one of the following options.
<?php | |
function voola_imagelink_setup() { | |
update_option('image_default_link_type', 'none'); | |
} | |
add_action('admin_init', 'voola_imagelink_setup', 10); |
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
//CSS | |
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
– The Git website
Choose one of the following options.
var mongoObjectId = function () { | |
var timestamp = (new Date().getTime() / 1000 | 0).toString(16); | |
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() { | |
return (Math.random() * 16 | 0).toString(16); | |
}).toLowerCase(); | |
}; |
<?php | |
/** | |
* UUID class | |
* | |
* The following class generates VALID RFC 4122 COMPLIANT | |
* Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
* | |
* UUIDs generated validates using OSSP UUID Tool, and output | |
* for named-based UUIDs are exactly the same. This is a pure | |
* PHP implementation. |
This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.
Use it like this!
# | A | B | C |
---|---|---|---|
1 | a | b | slug |
2 | foo | baz bing | =slugify(A2:B4) |
3 | bar | BAZ | |
4 | FOO | baz-bing |
function slugify(value) { | |
/* | |
* Convert the the vs in a range of cells into slugs. | |
*/ | |
slug = ''; | |
slug = value.substring(0, 30).toLowerCase(); | |
slug = slug.replace(/[^\w\s-]/g, ''); | |
slug = slug.replace(/\s+/g, '-'); | |
Logger.log(slug); |
add_action( 'gform_pre_submission_8', 'uploads_log_pre_submission' ); | |
function uploads_log_pre_submission( $form ) { | |
foreach ( $form["fields"] as &$field ) { | |
if ( $field["type"] == "fileupload" ) { | |
$id = "input_".$field["id"]; | |
if ( $field["multipleFiles"] ) { | |
if ( empty( $_POST["gform_uploaded_files"] ) ) | |
continue; |
<?php | |
namespace App\Providers\Passwords; | |
use Illuminate\Auth\Passwords\DatabaseTokenRepository; | |
class MyDatabaseTokenRepository extends DatabaseTokenRepository | |
{ | |
/** | |
* [Override] |