create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
//http://stackoverflow.com/questions/1386331/php-print-r-nice-table | |
function myprint_r($my_array) { | |
if (is_array($my_array)) { | |
echo "<table border=1 cellspacing=0 cellpadding=3 width=100%>"; | |
echo '<tr><td colspan=2 style="background-color:#333333;"><strong><font color=white>ARRAY</font></strong></td></tr>'; | |
foreach ($my_array as $k => $v) { | |
echo '<tr><td valign="top" style="width:40px;background-color:#F0F0F0;">'; | |
echo '<strong>' . $k . "</strong></td><td>"; | |
myprint_r($v); |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
Host *.kd.io | |
User username | |
IdentityFile ~/.ssh/koding | |
ProxyCommand ssh -i ~/.ssh/koding %[email protected] nc %h %p | |
Host gitlab.com-repo1 | |
Hostname gitlab.com | |
User git # Opcional | |
IdentityFile ~/.ssh/key_repo1 |
// http://stackoverflow.com/a/2280117/918072 | |
// Function to add 'toYMD()' method to a Date object to get the format 'yyyy-mm-dd' | |
(function() { | |
Date.prototype.toYMD = Date_toYMD; | |
function Date_toYMD() { | |
var year, month, day; | |
year = String(this.getFullYear()); | |
month = String(this.getMonth() + 1); | |
if (month.length == 1) { | |
month = "0" + month; |
# Add to the root of your Laravel5+ project | |
# Based on ricksonchew's answer | |
# http://laravel.io/forum/03-06-2015-how-to-setup-laravel-5-in-shared-hosting | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !^public | |
RewriteRule ^(.*)$ public/$1 [L] | |
</IfModule> |
// https://stackoverflow.com/questions/8587341/recursive-function-to-generate-multidimensional-array-from-database-result/8587437#8587437 | |
function buildTree(array $elements, $parentId = 0) { | |
$branch = array(); | |
foreach ($elements as $element) { | |
if ($element['parent_id'] == $parentId) { | |
$children = buildTree($elements, $element['id']); | |
if ($children) { | |
$element['children'] = $children; |
placeholder-color(color) | |
&::-webkit-input-placeholder | |
color color !important | |
&:-moz-placeholder /* Firefox 18- */ | |
color color !important | |
&::-moz-placeholder /* Firefox 19+ */ | |
color color !important | |
&:-ms-input-placeholder | |
color color !important | |
#!/usr/bin/env bash | |
# Variables | |
APPNAME=appname | |
DBHOST=localhost | |
DBNAME=db_app | |
DBUSER=user1 | |
DBPASSWD=password1 | |
# Update the box |
#! /usr/bin/env bash | |
# Variables | |
APPENV=local | |
DBHOST=localhost | |
DBNAME=dbname | |
DBUSER=dbuser | |
DBPASSWD=test123 | |
echo -e "\n--- Mkay, installing now... ---\n" |
# | |
# Slightly tighter CORS config for nginx | |
# | |
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs | |
# | |
# Despite the W3C guidance suggesting that a list of origins can be passed as part of | |
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox) | |
# don't seem to play nicely with this. | |
# |