As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
// apache_request_headers replicement for nginx | |
if (!function_exists('apache_request_headers')) { | |
function apache_request_headers() { | |
foreach($_SERVER as $key=>$value) { | |
if (substr($key,0,5)=="HTTP_") { | |
$key=str_replace(" ","-",ucwords(strtolower(str_replace("_"," ",substr($key,5))))); | |
$out[$key]=$value; | |
}else{ | |
$out[$key]=$value; | |
} |
jQuery(document).ajaxSuccess(function(e, xhr, settings) { | |
var widget_id_base = 'mywidget'; | |
if(settings.data.search('action=save-widget') != -1 && settings.data.search('id_base=' + widget_id_base) != -1) { | |
alert('yay!'); | |
// do other stuff | |
} | |
}); |
(The command examples assume OS X).
Just about everything that happens when you enter scons
is for Android. So anything you can do to speed up the Android part of our build will be useful.
Android NDK r7 can use ccache. We get huge improvements in build time with it. So install it (if you have HomeBrew, brew install ccache
) then set a shell variable NDK_CCACHE
to point to it. I.e., for me, having installed it with brew
, it would be export NDK_CCACHE=/usr/local/bin/ccache
.
NDK can also parallelize while compiling. Set a shell variable NUM_CPUS
to (according to Opie) 2x the number of cores in your machine. A quick way to get the # cores on your machine in OS X is system_profiler | grep "Number Of Cores"
in terminal. I have 2 cores, so my shell var setting is export NUM_CPUS=4
.
.leaflet-div-icon { | |
background: transparent; | |
border: none; | |
} | |
.leaflet-marker-icon .number{ | |
position: relative; | |
top: -37px; | |
font-size: 12px; | |
width: 25px; |
<?php | |
/* From https://www.usps.com/send/official-abbreviations.htm */ | |
$us_state_abbrevs_names = array( | |
'AL'=>'ALABAMA', | |
'AK'=>'ALASKA', | |
'AS'=>'AMERICAN SAMOA', | |
'AZ'=>'ARIZONA', | |
'AR'=>'ARKANSAS', |
Steps to setup mailtrap.io with your sendmail in ubuntu
Install sendmail and mailutils in ubuntu 'apt-get install sendmail mailutils'
In the terminal go into root prompt with
sudo -s
Go to the /etc/mail folder
Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/ |
This uses Twitter Bootstrap classes for CodeIgniter pagination.
Drop this file into application/config
.
<?php | |
namespace Chyrius\SiteBundle\Form; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Symfony\Component\Form\Form; | |
/** | |
* @todo Обрабатывать так же ошибки детей-детей | |
*/ | |
class FormErrors |