sudo apt-get update
sudo apt-get install fish
sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get update
sudo apt-get install fish``
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)Run this | |
"sudo -u postgres psql" | |
in your terminal to get into postgres | |
postgres=# | |
Run "CREATE USER new_username;" | |
Note: Replace new_username with the user you want to create, |
<?php | |
use Doctrine\ORM\Mapping as ORM; | |
use Doctrine\Common\Collections\ArrayCollection; | |
/** | |
* @ORM\Entity() | |
* @ORM\Table(name="user") | |
*/ | |
class User |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
# 301 Redirects for .htaccess | |
# =========================== | |
# Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
# Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
# Redirect an entire site to a subfolder |
<?php | |
function getFirstPara($string){ | |
$string = substr($string,0, strpos($string, "</p>")+4); | |
return $string; | |
} | |
// If you wanted to remove the paragraph tags from the HTML | |
function getFirstPara2($string){ | |
$string = substr($string,0, strpos($string, "</p>")+4); | |
$string = str_replace("<p>", "", str_replace("<p/>", "", $string)); |
(function() { | |
//first we will find the current width and height and declare a few variables that we'll use later | |
var vW = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); | |
var vH = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); | |
var orientation = null; | |
var viewRange = null; | |
//enter the pixel values that trigger your responsive design | |
var breakpoints = [480, 992, 1200]; |
/* | |
No jQuery necessary. | |
Thanks to Dan's StackOverflow answer for this: | |
http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport | |
*/ | |
function isOneHundredPercentOfElementInViewport(el) { | |
var rect = el.getBoundingClientRect(); | |
return ( | |
rect.top >= 0 && |