Skip to content

Instantly share code, notes, and snippets.

David davpsh

Block or report user

Report or block davpsh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@davpsh
davpsh / 0_reuse_code.js
Created Jan 15, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@davpsh
davpsh / gist:11314964
Last active Aug 29, 2015
WP Добавление произвольного блока к slug-у поста
View gist:11314964
/* WP Добавление произвольного блока к slug-у поста */
function GenerateRandomInt($length){
$Characters = '0123456789';
$RandomInt = '';
for ($i = 0; $i < $length; $i++) {
$RandomInt .= $Characters[rand(0, strlen($Characters) - 1)];
}
return $RandomInt;
}
You can’t perform that action at this time.