Skip to content

Instantly share code, notes, and snippets.

View iamsalnikov's full-sized avatar
💭
trying to close vim

Alexey Salnikov iamsalnikov

💭
trying to close vim
  • Limassol, Cyprus
View GitHub Profile
<?php
<?php
@iamsalnikov
iamsalnikov / fa.php
Last active August 8, 2018 15:27
fontawesome icons class to php contants
<?php
$pattern = '/\.fa-(.*):/';
$subject = file_get_contents('font-awesome.css');
preg_match_all($pattern, $subject, $matches);
$matches = $matches[1];
$string = '';
@iamsalnikov
iamsalnikov / script.js
Created December 6, 2013 13:59
Javascript capitalize string
/**
* Capitalize string
* Example of usage: "hello world".capitalize(); // Hello world
*/
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);
}